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
Should import normally, in the case of Rollup, it should bundle file successfully.
Actual Behavior
When bundle file using Rollup:
[!] SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
at callTranslator (node:internal/modules/esm/loader:436:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)
When imported in any JavaScript file:
import * as compatData from '@mdn/browser-compat-data' assert { type: 'json' };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
at callTranslator (node:internal/modules/esm/loader:436:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)
Node.js v22.7.0
The text was updated successfully, but these errors were encountered:
Operating System and version (if applicable):Does it work withtsc
(if applicable):Reproduction
Import
rollup-plugin-ts
using ESM, either inrollup.config.js
or anywhere like this:This issue seems related to rollup/rollup#5531.
Expected Behavior
Should import normally, in the case of Rollup, it should bundle file successfully.
Actual Behavior
When bundle file using Rollup:
When imported in any JavaScript file:
The text was updated successfully, but these errors were encountered: