Webpack multi./src/app.js dist/app.bundle.js中出错
我在项目中安装了Webpack multi./src/app.js dist/app.bundle.js中出错,webpack,Webpack,我在项目中安装了webpack和webpack cli: "devDependencies": { "webpack": "^4.8.3", "webpack-cli": "^2.1.3" } 但是,当我使用webpackCLI打包dist/app.bundle.js时,我得到以下错误: $ node_modules/.bin/webpack-cli src/app.js dist/app.bundle.js Hash: a7d5a0d1ff2c17795899 Ver
webpack
和webpack cli
:
"devDependencies": {
"webpack": "^4.8.3",
"webpack-cli": "^2.1.3"
}
但是,当我使用webpackCLI
打包dist/app.bundle.js
时,我得到以下错误:
$ node_modules/.bin/webpack-cli src/app.js dist/app.bundle.js
Hash: a7d5a0d1ff2c17795899
Version: webpack 4.8.3
Time: 139ms
Built at: 2018-05-14 11:53:07
1 asset
Entrypoint main = main.js
[0] ./src/app.js 28 bytes {0} [built]
[1] multi ./src/app.js dist/app.bundle.js 40 bytes {0} [built]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
ERROR in multi ./src/app.js dist/app.bundle.js
Module not found: Error: Can't resolve 'dist/app.bundle.js' in '/Users/lll/Desktop/VueTest/hello-world'
@ multi ./src/app.js dist/app.bundle.js
在
网页4
中,应为命令添加参数:
node_modules/.bin/webpack-cli src/app.js --output dist/app.bundle.js --mode development
添加--output
参数,您的问题将得到解决
您还可以查看
网页4
中的。,您应该为命令添加参数:
node_modules/.bin/webpack-cli src/app.js --output dist/app.bundle.js --mode development
添加--output
参数,您的问题将得到解决
你也可以看一下