-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
- Rollup Version: Latest
- Operating System (or Browser): Linux
- Node Version (if applicable): Latest
- Link to reproduction (IMPORTANT, read below): https://repl.it/repls/DaringRoughHypertalk
Clicking RUN will printurlas seen bynode rollup.config.jsandrollup -c rollup.config.js.
Expected Behavior
When exporting via:
// index.js
export const url = import.meta.url;And importing in a Rollup config that will be executed with rollup -c:
// rollup.config.js
import { url } from './index.js'url should equal the import.meta.url for the file in which it is exported, in this case, file:///path/to/index.js.
Actual Behavior
Rollup seems to rewrite import.meta.url source in the config file such that import.meta.url is re-computed at runtime, and url is equal to file:///path/to/rollup.config.js. This conflicts with Node's output, and causes errors in compiled bundles.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels