webpack打包多个文件

webpack.config.js


const pathlib = require('path')


module.exports={
    entry:{
        index:'./pages/index',
        pageA:'./pages/pageA'
    }
    output: {
        path:pathlib.resolve('dest/'),
        filename:'[name].bundle.js'
    }
}

filename的名字为entry入口输入的地址对应的名字

补充

webpack打包自定义名字的文件

webpage --config 文件名

发布了71 篇原创文章 · 获赞 21 · 访问量 3639

猜你喜欢

转载自blog.csdn.net/qq_26386437/article/details/105145166