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
Why is rollup creating an additional file of just exports from my entry file? #5400
Comments
https://rollupjs.org/configuration-options/#preserveentrysignatures will likely provide some help. |
Thanks, I'll check that out. Before you responded I was in the middle of outlining a minimal example of the issue: a.js:
b.js c.js When I compile a.js, I would expect 2 files: but instead I get: 'a.js' - consists of definitions for a's exported variables If I change the contents of b.js to not use String.concat, or c.js to not use Array.find, then it outputs the expected 2 files. Confusing! |
Well adding |
Shared dependencies between entry files and dynamic imports are inlined into the entry chunk. That means, the entry chunk gets an additional export, changing its export signature. |
My entry file 'app.js' contains a lot of code, dynamic imports, exports, etc.
I can't figure out why Rollup decides to create a file with just the exports from my entry file, named 'app-[hash1].js':
And it creates another file 'app-[hash2].js' that contains all the code relating to those exported variables and methods.
I would like it to just produce 1 file for 'app.js' and 1 file for each of its dynamic imports.
I try to recreate this behaviour with minimal code and it will always produce 1 app.js file instead of 2. I'm sure there's a good reason, I just can't figure out why it's doing this for one entry file and not another.
The text was updated successfully, but these errors were encountered: