Skip to content

splitchunks in webpack 4 #7

@ggetz

Description

@ggetz

From CesiumGS/cesium#6610

In the cesium and webpack tutorial (https://cesiumjs.org/tutorials/cesium-and-webpack/), there is a section about code splitting which uses webpack.optimize.CommonsChunkPlugin.
However, in the new webpack 4 this has been deprecated, so you get this error:
ERROR Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.

I can't seem to work out the correct syntax for using splitChunks with cesium, it would be very helpful to add this to the tutorial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions