search

Home  >  Q&A  >  body text

javascript - webpack多页面打包的问题

巴扎黑巴扎黑2786 days ago392

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 16:34:03

    entry: {
        postdetail: './src/app.js',
        productdetail: './src/app.js',
        order: './src/js/order.js'
    },
    output: {
        path: path.join(__dirname, './build/'),
        filename: 'js/[name].bundle.js'
    }
    
    多个入口文件,统一出口文件

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:34:03

    https://github.com/callmedada... It has multi-page packaging support, you can refer to the following ideas

    The general idea is to configure the mapping of entry and html, and then traverse and use html-webpack-plugin to generate it

    reply
    0
  • Cancelreply