小编袁子文*_*袁子文的帖子

webpack 运行构建但不退出命令

Webpack 成功运行构建,但之后无法自动退出命令。如何退出?

删除 --progress 和 webpack-dashboard,仍然不能

webpack.base.conf.js

...// require
module.exports = {
  mode: process.env.NODE_ENV,
  entry: {
    app: './src/main.js',
  },
  output: {
    path: util.resolve('dist'),
    filename: 'js/[name].[hash].js',
    chunkFilename: 'js/[id].[chunkhash].js',
  },
  module: {
    rules: [
      ...util.eslint,
      ...util.cssLoaders,
      // more loaders
  },
  plugins: [
      new CleanWebpackPlugin(),
      new HtmlWebpackPlugin({
        template: path.resolve(__dirname, '../public/index.html'),
        minify: {
          removeComments: true,
          collapseWhitespace: true,
          removeAttributeQuotes: true,
        },
      }),
    new DllLinkPlugin({
      htmlMode: true,
      config: require('./webpack.dll.conf.js'),
    }),
  ],
  stats: {
    children: false, 
    builtAt: true, 
    cached: true,
    cachedAssets: true
  }
};

Run Code Online (Sandbox Code Playgroud)

webpack.prod.conf.js

// requere... …
Run Code Online (Sandbox Code Playgroud)

webpack vue.js

9
推荐指数
1
解决办法
1221
查看次数

标签 统计

vue.js ×1

webpack ×1