Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terser plugin doesn't pass check by typescript (TS1479) #1795

Open
eXory2024 opened this issue Oct 19, 2024 · 0 comments
Open

terser plugin doesn't pass check by typescript (TS1479) #1795

eXory2024 opened this issue Oct 19, 2024 · 0 comments

Comments

@eXory2024
Copy link

Expected Behavior

No error should be emitted by tsc.

Actual Behavior

The following error is emitted by tsc:

error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("terser")' call instead.

2 import type { MinifyOptions } from 'terser';
                                     ~~~~~~~~


Found 1 error in node_modules/@rollup/plugin-terser/types/index.d.ts:2

Additional Information

The rollup config is intentionally not populated as it is not relevant to the bug / behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant