vue2-vue-router2-webpack2 icon indicating copy to clipboard operation
vue2-vue-router2-webpack2 copied to clipboard

多入口工程( 分支 mpa1) 在 dev 模式下 配置问题

Open Hank-wood opened this issue 6 years ago • 1 comments

开发模式 http://localhost:8090

  1. 怎么时时预览 src 下的 web admin 2个工程?
  2. webpack 配置中并没有找到对应

Hank-wood avatar May 04 '18 05:05 Hank-wood

http://localhost:8090/admin.html http://localhost:8090/web.html

webpack 想要的配置在生成首页中

exports.genHtmlPlugins = function () {

    var baseWebpackConfig = require('./webpack.base.config');
    var path = require('path')
    var plugins = [];
    Object.keys(baseWebpackConfig.entry).forEach(function (name) {
        plugins.push(
            new HtmlWebpackPlugin({
                filename: isProd ? path.resolve(__dirname, `../dist/${name}/index.html`) : name + '.html',
                template: 'index.tpl.html',
                chunks: isProd ? ['manifest', 'vendor', `${name}-vendor`, name] : [name],
                inject: true
            }))
    })
    return plugins
}

qinshenxue avatar May 09 '18 03:05 qinshenxue