Skip to content

SplitChunks configuration does not affect extracted css files #13

Closed
@pshurygin

Description

@pshurygin

Hello! I'm using this plugin with webpack 4 splitChunks option configured to extract vendor code to a separate chunk like this:

optimization:{
    splitChunks: {
        chunks: "all",
        minSize: 1000,
        minChunks: 1,
        maxAsyncRequests: 10,
        maxInitialRequests: 10,
        name: true,
        cacheGroups: {
            default: false,
            vendors: {
                name: 'vendor',
                test: /node_modules[\\/]/,
                priority: 3
            }
        }
    }
}

It looks like this plugin does not honour this configuration and does not extract vendor css into separate file. Instead it adds vendor styles into every entrypoint css file, which leads to css duplication between several entrypoints. I'm not sure if this is an expected behavior or a bug. I could provide a simple reproduction repo if it's needed.

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