Repository navigation
TypeScript - terser is not callable #1575
Replies: 2 comments
|
Sorry TS playground is being buggy. Go to TS Config -> Target and set it to ES2022. Then the error appears. |
|
I reproduced TS2349 locally with an ESM config ( The relevant detail is the package's declaration entry: it points both import modes at Two config-level workarounds I verified with plugin 0.4.4 / Rollup 3.29.0:
tsc rollup.config.cts --module NodeNext --moduleResolution NodeNext --target ES2022 --esModuleInterop false --skipLibCheck --outDir .config-build
rollup -c .config-build/rollup.config.cjsThe I would avoid replacing the call with |
Uh oh!
There was an error while loading. Please reload this page.
The sample code for @rollup/plugin-terser is not working for me
The error can be seen on TS Playground here:
https://www.typescriptlang.org/play?target=99&moduleResolution=99&module=199&declaration=false&esModuleInterop=false&jsx=1#code/JYWwDg9gTgLgBDAplAzsuAzKERwOQAC2ANsQK5gD0Y5A5sAHYC0SqyeA3ALABQviAD0iw4AE0QYAhmWLwA3rzhxGYMjABc+FFADGlRuIEA6AFYo8AGkVwIa1RrgKeSpaOBRNeWzHuXrSjGgQSQc8HTM8awBfK2c4GjJ6BhRNAG1WNCgACgBKAF1eKI4gA
Settings can be viewed on TS playground, generally modern environment e.g. module and module resolution: NodeNext
All reactions