Skip to content

Commit

Permalink
feat: 🎸 Using esbuild minifiers for faster build
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimck committed Nov 9, 2021
1 parent a745b4c commit 3a2107c
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 1 deletion.
144 changes: 144 additions & 0 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"@types/yargs": "^17.0.5",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"esbuild": "^0.13.13",
"typescript": "^4.4.4"
}
}
12 changes: 11 additions & 1 deletion packages/cli/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,17 @@ export default async (
},
optimization: {
minimize: isProduction && !isServer,
minimizer: [new TerserPlugin(), new CssMinimizerPlugin()] // TODO explore minimizer options
minimizer: [
new TerserPlugin({
minify: TerserPlugin.esbuildMinify
}),
new CssMinimizerPlugin({
// FIXME esbuildMinify is not yet in CssMinimizerPlugin definitions
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore esbuildMinify
minify: CssMinimizerPlugin.esbuildMinify
})
]
},
resolve: {
extensions: ['.js', '.jsx'],
Expand Down

0 comments on commit 3a2107c

Please sign in to comment.