cesium-webpack-example icon indicating copy to clipboard operation
cesium-webpack-example copied to clipboard

treeshake example

Open chris-cooper opened this issue 3 years ago • 0 comments

It would be good to include an example of best practice for more production oriented builds, like removing debug pragmas and tree shaking etc.

e.g. in this toy example the build size is reduced 16.4 MiB => 78.5 KiB with Cesium 1.96.

Note that sideEffects: false can alternatively live in the Cesium package.json. It can include a list of files if some do have side effects that need to be respected https://webpack.js.org/guides/tree-shaking/

chris-cooper avatar Aug 10 '22 01:08 chris-cooper