Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude / tree-shake Blueprint icon package dependency #25

Merged
merged 10 commits into from
Jul 17, 2020
Prev Previous commit
Next Next commit
Remove Blueprint icons to reduce build size.
  • Loading branch information
cnrudd committed Jun 26, 2020
commit 76b9210c724d9e158cfe8e09f0064671f731e2b5
6 changes: 6 additions & 0 deletions configureWebpack.js
Original file line number Diff line number Diff line change
@@ -420,6 +420,12 @@ function configureWebpack(env) {
// Clean (remove) the output directory before each run.
new CleanWebpackPlugin(),

// Remove Blueprint icons since they are never used
new webpack.NormalModuleReplacementPlugin(
/.*\/generated\/iconSvgPaths.*/,
path.resolve(hoistPath, 'static/emptyIconSvgPaths.js'),
),

// Inject global constants at compile time.
new webpack.DefinePlugin({
'process.env': {NODE_ENV: JSON.stringify(process.env.NODE_ENV)},