首页 > 解决方案 > 此模块的插件或加载程序报告了无效的依赖关系

问题描述

我有一个 Laravel/Inertia.js/Svelte 项目,我正在导入一个基于svelte 组件中Zurb Foundation设置文件的设置 sass 文件:

<style lang="scss">
    @import 'resources/sass/settings';

    ...
</style>

该设置文件依次从基础站点模块 (utils) 导入 sass 文件。即使导入工作正常,我也会从 Webpack 收到以下警告:

WARNING in ./resources/js/academy/transactions/orders/Order.svelte
Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.
Invalid dependencies may lead to broken watching and caching.
As best effort we try to convert all invalid values to absolute paths and converting globs into context 
dependencies, but this is deprecated behavior.
Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).
Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).
Globs: They are not supported. Pass absolute path to the directory as context dependencies.
The following invalid values have been reported:
 * "C:/Program Files/Android/sdk/code/inertia/node_modules/foundation-sites/scss/util/_breakpoint.scss" 
 * "C:/Program Files/Android/sdk/code/inertia/node_modules/foundation-sites/scss/util/_color.scss"      
 * "C:/Program Files/Android/sdk/code/inertia/node_modules/foundation-sites/scss/util/_direction.scss"  
 * and more ...

警告中的路径看起来是绝对的,所以我不确定如何解决警告。

有什么想法可以解决警告吗?

标签: webpacksveltelaravel-mixnode-sass

解决方案


推荐阅读