获得 95% 发出未命名的兼容插件错误:未知:未知错误,打开
Posted
技术标签:
【中文标题】获得 95% 发出未命名的兼容插件错误:未知:未知错误,打开【英文标题】:Getting 95% emitting unnamed compat pluginError: UNKNOWN: unknown error, open 【发布时间】:2020-06-14 15:44:55 【问题描述】:每当我执行npm run watch
时,第一次编译工作正常 - 但经过几次编译后,我最终会收到此错误:
95% 发出未命名的兼容插件错误:未知:未知错误,打开 'D:\Laragon\www\erproj\public\js\app.js'
const mix = require('laravel-mix')
require('laravel-vue-lang/mix')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
mix.webpackConfig(
module:
rules:
[
enforce: 'pre',
exclude: /node_modules/,
loader: 'eslint-loader',
test: /\.(js|vue)?$/
,
]
)
mix.webpackConfig(
module:
rules:
[
test: /\.scss$/,
use:
[
loader: 'sass-loader'
,
loader: 'sass-resources-loader',
options:
resources: './resources/sass/_*.scss'
]
]
)
mix.webpackConfig(
resolve:
alias:
'@': path.resolve('./resources/js'),
'~': path.resolve('./resources/')
)
mix.webpackConfig(
resolve:
alias:
'vue$': 'vue/dist/vue.js'
)
mix.webpackConfig(
resolve:
alias:
'@lang': path.resolve('./resources/lang'),
,
,
module:
rules:
[
test: /resources[\\/]lang.+\.(php|json)$/,
loader: 'laravel-localization-loader',
,
],
,
)
我通过谷歌来回搜索,没有找到可行的解决方案。 感谢您的帮助。
【问题讨论】:
【参考方案1】:尝试手动设置要编译所有资产的路径。您可以通过添加 mix.setPublicPath('public') 来做到这一点。
参考:https://laravel-mix.com/docs/6.0/api#setpublicpathpath
【讨论】:
以上是关于获得 95% 发出未命名的兼容插件错误:未知:未知错误,打开的主要内容,如果未能解决你的问题,请参考以下文章
如何在未知环境中安全加载 Polymer - 多个版本或命名空间?
错误:未知的命名模块“react-native-webrtc”