Ai
0 Star 0 Fork 0

嗷大张/webpack5-study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 456 Bytes
一键复制 编辑 原始数据 按行查看 历史
aodazhang 提交于 2022-12-27 14:46 +08:00 . 代码更新
const path = require('path')
module.exports = {
// 多入口 -> 多输出
entry: {
main: './src/index.js',
test: './src/index.js'
},
output: {
// 输出的文件名:以 entry 中的 key 作为文件名
filename: 'js/[name]_[contenthash:8].js', // 输出到 dist/js 目录下
// 输出的目录:当前同级目录 dist
path: path.resolve(__dirname, 'dist'),
// 输出的外部资源路径
publicPath: './'
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aodazhang/webpack5-study.git
git@gitee.com:aodazhang/webpack5-study.git
aodazhang
webpack5-study
webpack5-study
master

搜索帮助