Fork me on GitHub
摘要: 在项目文件下新建webpack.config.js,具体配置如下 然后运行命令:webpack,打包成功 阅读全文
posted @ 2020-10-21 14:42 亲爸爸 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1.新建如下文件格式 2.mian.js内容 3.utils中内容 4.运行命令 npm init 得到package.json 5.将mian.js内容打包到dist文件下:webpack ./src/main.js -o ./dist 得到如下文件 6.在html中引用打包后的js 7.运行结果 阅读全文
posted @ 2020-10-21 14:26 亲爸爸 阅读(103) 评论(0) 推荐(0) 编辑