webpack main.js打包成yyyy.js报错找不到mian.js

本文详细介绍了使用Webpack4构建工具进行项目打包的过程,包括命令行操作与常见错误提示。解析了错误代码背后的原因,并提供了修改建议,帮助开发者正确配置并避免模块未找到等常见问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

***命令:*F:\teach\xcEdu\xcEduUI01\xc-ui-pc-static-portal\webPack>webpack index.js buld.js Hash: fc0ca433ff23b6861bb4 Version: webpack 4.30.0 Time: 5304ms Built at: 2019-04-23 12:05:59 1 asset Entrypoint main = main.js [0] (webpack)/buildin/global.js 472 bytes {0} [built] [1] multi ./index.js buld.js 40 bytes {0} [built] [2] ./index.js 490 bytes {0} [built] [3] ./model01.js 257 bytes {0} [built] [4] ./vue.min.js 84.6 KiB {0} [built] + 3 hidden modules 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 ./index.js buld.js Module not found: Error: Can’t resolve ‘buld.js’ in ‘F:\teach\xcEdu\xcEduUI01\xc-ui-pc-static-portal\webPack’ @ multi ./index.js buld.js main[1] **~~

将命令webpack index.js buid.js改为 webpack index.js -o buid.js 原因是你的webpack版本比较高了,新版本的命令已经更改了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值