-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
kind: supportAsking for support with something or a specific use caseAsking for support with something or a specific use casescope: dependenciesIssues or PRs about updating a dependencyIssues or PRs about updating a dependencyscope: docsDocumentation could be improved. Or changes that only affect docsDocumentation could be improved. Or changes that only affect docssolution: tsc behaviorThis is tsc's behavior as well, so this is not a bug with this pluginThis is tsc's behavior as well, so this is not a bug with this plugin
Description
I see that the code has some references to tslib
and importHelpers
so I assume this should work transparently. If not, I'll be happy to know what is missing.
Here is how to reproduce:
Installed packages:
$ npm ls --depth=0
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
tsconfig.json
:
{
"compilerOptions": {
"target": "es5"
}
}
rollup.config.js
:
import typescript from 'rollup-plugin-typescript2';
export default {
entry: './main.ts',
plugins: [
typescript()
]
}
main.ts
:
import {Foo} from './module';
console.log("HERE" + Foo);
And module.ts
:
export class Foo {}
export class Bar extends Foo {}
When running rollup as follows:
./node_modules/.bin/rollup -c rollup.config.js
I get this error:
🚨 rpt2: module.ts (3,18): semantic error TS2354 This syntax requires an imported helper but module 'tslib' cannot be found.
module.ts
I think this is because the extends
syntax requires an __extends
helper from tslib
, but typescript can't find tslib
.
Expected result is that the required helpers become part of the bundle.
Thanks.
leniel, Nyeedz, timmywil, evandrocoan and shark-lajiao
Metadata
Metadata
Assignees
Labels
kind: supportAsking for support with something or a specific use caseAsking for support with something or a specific use casescope: dependenciesIssues or PRs about updating a dependencyIssues or PRs about updating a dependencyscope: docsDocumentation could be improved. Or changes that only affect docsDocumentation could be improved. Or changes that only affect docssolution: tsc behaviorThis is tsc's behavior as well, so this is not a bug with this pluginThis is tsc's behavior as well, so this is not a bug with this plugin