You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
virtual plugin creates files that are ignored by any plugin that uses createFilter #1680
This looks like very legitimate code (rollup will output the content of virtual_main eventually). But strip() (or SWC, Terser, Babel, or any other plugin that relies on CreateFilter) will be silently ignored, because virtual appends a \x00virtual: prefix to all files, that then always returns false on CreateFilter.
As the previous bug suggests, removing the \x00 on CreateFilter may cause regressions, as well as removing it from virtual (although I'd assume it's a much more reasonable change). If both those ideas are bad, then could I suggest allowing a prefix option to virtual, that allows folks to change this?
virtual seems to be the only official way to support rollup being called with a string (instead of a file), and it's completely broken as is. Without regressing anything, adding a prefix option to virtual and having some documentation that calls out that any filter that has include/exclude doesn't work with the default option sounds better.
Activity