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
Option to rename _virtual
folder
#4437
Comments
Why do you rely on |
@jacksteamdev I have the exact same issue. How did you solve it in the end? I want to keep es modules in my background service worker (because I need to obfuscate certain modules but not all of them). My background sw also imports a node module which is exported as a commonjs and it creates |
You should be able to use |
@lukastaegert is there an export for the default |
nevermind, I got what @lukastaegert meant with |
You can do that if you provide an object for
should give you what you want. |
Feature Use Case
I need to preserve the default export in a plugin I'm building for developing Chrome Extensions; some code I don't control uses default export. When I use
preserveModules
, virtual files get put in the folder_virtual
.This is all fine, except that
_virtual
is an illegal filename for my use case; files and folders in Chrome Extensions cannot start with_
.Feature Proposal
I understand there's some difficulty in using the strict return value of
entryFileNames
, but it would be useful to be able to change the name of the virtual folder.I've tried renaming everything in the bundle manually, but my plugin relies heavily on
this.getFileName
, which doesn't reflect changes to the bundle. Maybe this is a bug or I'm doing something wrong, but it would be great to be able to configure_virtual
to something else.rollup/src/Chunk.ts
Line 476 in 5a53919
As far as I'm concerned, it doesn't have to be a dynamic option, a static string would be enough.
The text was updated successfully, but these errors were encountered: