gpt4 book ai didi

vue.js - 关键依赖 : the request of a dependency is an expression, vue.js

转载 作者:行者123 更新时间:2023-12-03 23:49:01 25 4
gpt4 key购买 nike

我的测试应用程序编译正常,除了我收到此警告:
“关键依赖:依赖的请求是一个表达式”

(base) marco@pc01:~/webMatters/vueMatters/PeerJS-VueJS-Test$ npm run serve

> testproject@0.1.0 serve /home/marco/webMatters/vueMatters/PeerJS-VueJS-Test
> vue-cli-service serve

INFO Starting development server...
98% after emitting CopyPlugin

WARNING Compiled with 1 warnings
7:22:25 PM

warning in ./node_modules/peerjs/dist/peerjs.min.js

Critical dependency: the request of a dependency is an expression


App running at:
- Local: http://localhost:8080
- Network: http://ggc.world/

Note that the development build is not optimized.
To create a production build, run npm run build.

我读到它可能取决于 webpack,但没有找到如何正确使用它。

这是 webpack.config.js :
{
"mode": "development",
"output": {
"path": __dirname+'/static',
"filename": "[name].[chunkhash:8].js"
},
"module": {
"rules": [
{
"test": /\.vue$/,
"exclude": /node_modules/,
"use": "vue-loader"
},
{
"test": /\.pem$/,
"use": "file-loader"
}
]
},
node: {
__dirname: false,
__filename: false
},
resolve: {
extension: ['*', '.pem'],
},
devServer: {
watchOptions: {
aggregateTimeout: 300,
poll: 1000
},
https: true,
compress: true,
public: 'ggc.world:8080'
}
}

关于如何解决它的任何想法?

最佳答案

以下代码对我有用。编辑 vue.config.js 并添加 webpack 配置:

configureWebpack: {
module: {
exprContextCritical: false
}
}

关于vue.js - 关键依赖 : the request of a dependency is an expression, vue.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60494700/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com