-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Description
- Rollup Plugin Name: typescript
- Rollup Plugin Version: 11.1.6
- Rollup Version: 4.14.0
- Operating System (or Browser): Mac OS 14.6.1
- Node Version: 22.4.1
- Link to reproduction (
⚠️ read below): https://github.com/michaelglass/rollup-typescript-repro
Expected Behavior
on Node V22, the keyword assert has been replaced with with,
when my rollup.config.ts includes an import using with
import pkg from "./package.json" with { type: "json" };
npx rollup -c --pluginConfig typescript
will run rollup
Actual Behavior
I get the error,
[!] SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:164:18)
at callTranslator (node:internal/modules/esm/loader:439:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:445:30)
at async ModuleJob._link (node:internal/modules/esm/module_job:106:19)I get the same error when passing the tsconfig manually to rollup, e.g.
npx rollup -c --configPlugin typescript={target:\"esnext\"\,module:\"Preserve\"}
Additional Information
clone the repo above to see a small reproduction
git clone [email protected]:michaelglass/rollup-typescript-repro.git
cd rollup-typescript-repro
direnv allow # if you're using nix / direnv, or nix develop
npm install
npm run rollup-tsdbjorge and aryaemami59
Metadata
Metadata
Assignees
Labels
No labels