-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Consider this example: import-meta-url-slow.zip
With source maps disabled, adding metaUrlPlugin() increases runtime from ~80ms to ~1200ms; with source maps enabled, it is ~120ms to ~3400ms. Given that using this plugin also causes every page load to cause potentially multiple rebuilds, the resulting experience is quite awful.
To be clear, I do actually use import.meta.url in the problematic large files. I am not sure why exactly it is slow: while the resource*.js files are fairly large, most of the size is concentrated in a few strings. By any chance, are you repeatedly replacing a part of a JS string? (I haven't profiled it.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels