Skip to content

Individual packaging, dynamic config per compile step #1484

Description

@tom2strobl

Description

When packaging individually, the same webpack.config.js is applied to all slsw.lib.entries, when trying to leverage CopyWebpackPlugin, or in my case @sentry/webpack and I have 40 functions, then it uploads (40*40) 1600 sourcemaps to sentry.

In #333 (comment) there was a discussion that there's no way around it, but it's been 5 years and in the meantime I'm curious if somebody found a way?

Afaik webpacks MultiCompiler always compiles sequentially and not in parallel. Since we have a static map of entries (slsw.lib.entries) we know how many compile jobs there are.

There's the before:webpack:compile hook I guess, but I'm not sure if one can change the webpackConfig path dynamically mid-flight?

Is there something I missed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions