About update to @rollup/plugin-typescript
GHLandy opened this issue · 2 comments
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?
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 ?
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.