Skip to content

Commit

Permalink
build: add support for Create React App (#3027)
Browse files Browse the repository at this point in the history
Closes #2944
  • Loading branch information
char0n authored Apr 20, 2022
1 parent e1029ca commit d4c3085
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions webpack/es-bundle.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ import { WebpackBundleSizeAnalyzerPlugin } from "webpack-bundle-size-analyzer"
// import path from "path"
// import { StatsWriterPlugin } from "webpack-stats-plugin"

const minimize = true
const sourcemaps = true

const result = configBuilder(
{
minimize: true,
minimize,
mangle: true,
sourcemaps: true,
sourcemaps,
includeDependencies: true,
emitWorkerAssets: false,
},
Expand All @@ -46,6 +49,8 @@ const result = configBuilder(
maxAssetSize: 1024000 * 3.25, // MB
},

devtool: sourcemaps && minimize ? "nosources-cheap-module-source-map" : false,

plugins: [
new DuplicatesPlugin({
// emit compilation warning or error? (Default: `false`)
Expand Down

0 comments on commit d4c3085

Please sign in to comment.