Skip to content

Commit

Permalink
don't minimize create layer functions
Browse files Browse the repository at this point in the history
for drag and drop
closes #757
  • Loading branch information
kfarr committed Aug 12, 2024
1 parent 533b51d commit f4ddd19
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"serve": "^14.2.1",
"storybook": "^7.6.3",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.10",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4"
Expand Down
21 changes: 20 additions & 1 deletion webpack.prod.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const webpack = require('webpack');
const path = require('path');
const Dotenv = require('dotenv-webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const TerserPlugin = require('terser-webpack-plugin');
const DEPLOY_ENV = process.env.DEPLOY_ENV ?? 'production';

module.exports = {
Expand Down Expand Up @@ -104,5 +104,24 @@ module.exports = {
}
}
]
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
mangle: {
reserved: [
'createSvgExtrudedEntity',
'createStreetmixStreet',
'createCustomModel',
'createPrimitiveGeometry',
'createIntersection',
'createSplatObject'
] // keep full names for drag-and-drop functions
}
}
})
]
}
};

0 comments on commit f4ddd19

Please sign in to comment.