Closed chris-cooper closed 2 years ago
Hi @chris-cooper, I added the recommended config after a change in CesiumJS which allows tree shaking in https://github.com/CesiumGS/cesium-webpack-example/pull/35. Our README also describes how to remove debug pragmas. OK to close this?
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 Cesiumpackage.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/