Skip to content

Commit d4c3085

Browse files
authored
build: add support for Create React App (#3027)
Closes #2944
1 parent e1029ca commit d4c3085

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

webpack/es-bundle.babel.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ import { WebpackBundleSizeAnalyzerPlugin } from "webpack-bundle-size-analyzer"
1515
// import path from "path"
1616
// import { StatsWriterPlugin } from "webpack-stats-plugin"
1717

18+
const minimize = true
19+
const sourcemaps = true
20+
1821
const result = configBuilder(
1922
{
20-
minimize: true,
23+
minimize,
2124
mangle: true,
22-
sourcemaps: true,
25+
sourcemaps,
2326
includeDependencies: true,
2427
emitWorkerAssets: false,
2528
},
@@ -46,6 +49,8 @@ const result = configBuilder(
4649
maxAssetSize: 1024000 * 3.25, // MB
4750
},
4851

52+
devtool: sourcemaps && minimize ? "nosources-cheap-module-source-map" : false,
53+
4954
plugins: [
5055
new DuplicatesPlugin({
5156
// emit compilation warning or error? (Default: `false`)

0 commit comments

Comments
 (0)