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

Error: Note that you need plugins to import files that are not JavaScript #96

Closed
nonara opened this issue May 22, 2020 · 2 comments
Closed

Comments

@nonara
Copy link

nonara commented May 22, 2020

This error happens whenever trying to use dts() in a project which has a tsconfig.json file with "noEmit": true, specified.

Possible related to rollup/plugins#287

@Swatinem
Copy link
Owner

Hm, we possibly have to override that option here:

const OPTIONS_OVERRIDE: ts.CompilerOptions = {
// Ensure ".d.ts" modules are generated
declaration: true,
// Skip ".js" generation
emitDeclarationOnly: true,
// Skip code generation when error occurs
noEmitOnError: true,
// Avoid extra work
checkJs: false,
declarationMap: false,
skipLibCheck: true,
// Ensure TS2742 errors are visible
preserveSymlinks: true,
// Ensure we can parse the latest code
target: ts.ScriptTarget.ESNext,
};

Can you give a more detailed example? I suspect you are using the plugin with .ts files?

@nonara
Copy link
Author

nonara commented May 24, 2020

That did the trick. Thanks 😄

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

2 participants