parallel-webpack icon indicating copy to clipboard operation
parallel-webpack copied to clipboard

SourceMap not generated

Open zazagag opened this issue 4 years ago • 0 comments

Does the parallel-webpack support sourcemap? I am generate sourcemap through webpack.SourceMapDevToolPlugin and after start using parallel-webpack via NodeAPI, sourcemaps are not generated.

Provide your webpack config

{
      ....
  devtool: false,
  plugins: [
    ...
    new webpack.SourceMapDevToolPlugin({
      filename: '../../source-maps-browser/[file].map',
      append: '\n//# sourceMappingURL=[file].map',
    }),
    ...
  ],
  optimization: {
    runtimeChunk: 'single',
    splitChunks: {
      cacheGroups: {
        commons: {
          test: /[\\/]node_modules[\\/].*\.js$/,
          name: 'vendors',
          chunks: 'all',
        },
        styles: {
          name: 'styles',
          test: /\.css$/,
          chunks: 'all',
          enforce: true,
        },
      },
    },
    minimizer: [
      new TerserPlugin({
        cache: true,
        parallel: true,
        sourceMap: true,
      }),
    ],
  },
  ...
}

Provide your Environment details

  • Node version: v12.16.2

  • webpack version: 4.44.1

  • parallel-webpack version: 2.6.0

zazagag avatar Aug 26 '20 09:08 zazagag