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

About update to @rollup/plugin-typescript #66

Closed
GHLandy opened this issue Apr 16, 2020 · 2 comments
Closed

About update to @rollup/plugin-typescript #66

GHLandy opened this issue Apr 16, 2020 · 2 comments

Comments

@GHLandy
Copy link

GHLandy commented Apr 16, 2020

Hello there, I want to upate to @rollup/plugin-typescript from rollup-plugin-typescript, but found it only compile main.ts but not the lunchtime.ts, millisecondsUntil.ts (as in this repo) in the cjs format.

I have look through https://rollupjs.org/guide but do not found anything to solve this.

So, I want to know if there is any special configuaration about this problem?

@ash-r1
Copy link

ash-r1 commented Jun 7, 2020

I met the same problem.

It might be caused by this change: https://github.com/rollup/plugins/blob/master/packages/typescript/CHANGELOG.md#v300

Add note about old behaviour
( It mentions to rollup/plugins#181 )

Does anyone know how to solve this ?

@felix-kaestner
Copy link

I think the issue seems to be related to how @rollup/plugin-typescript handles commonjs.
If you switch the module option inside tsconfig.json to either es2015 or ESNext the problem disappears since typescript will inline the code instead of producing require statements.
If someone can reproduce this, I think an issue should be opened at @rollup/plugin-typescript.

@GHLandy GHLandy closed this as completed Jul 12, 2021
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

3 participants