Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunks from customSplitting get imported in every entry #27

Open
Profesor08 opened this issue Feb 8, 2023 · 1 comment
Open

Chunks from customSplitting get imported in every entry #27

Profesor08 opened this issue Feb 8, 2023 · 1 comment

Comments

@Profesor08
Copy link

I have an MPA, every .html file includes it own script file. Everithing is building correctly except one case, chunks jquery, vendor or common are imported in html and in script file.

File example

console.log("hello");

Build example

import"./chunks/landing.js";
import"./chunks/common.js";
import"./chunks/vendor.js";
import"./chunks/jquery.js";
console.log("hello");

Plugin config

    chunkSplitPlugin({
      strategy: "single-vendor",
      customSplitting: {
        jquery: [/jquery/],
        vendor: [/node_modules/],
        common: [/src\/ts\/utils/, /src\/ts\/components/],
      },
    }),
@Profesor08
Copy link
Author

It is rollup behavior of manualChunks, so I think it is not related to this plugin. But any way I would like to find a solotion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant