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

TypeScript Error: failed to transpile tslib.es6.js #5

Closed
mathix420 opened this issue Mar 21, 2021 · 5 comments
Closed

TypeScript Error: failed to transpile tslib.es6.js #5

mathix420 opened this issue Mar 21, 2021 · 5 comments

Comments

@mathix420
Copy link

Here is all my config hope it help fixing an issue!

> rollpkg build

✓ Cleaning dist folder 1 ms
✓ Checking rollpkg invariants 3 ms
✓ Creating rollup config 0 ms
✗ FAILED AT: Creating esm, cjs builds

TypeScript Error: failed to transpile '[...]/node_modules/tslib/tslib.es6.js'

tsconfig.json

{
    "extends": "rollpkg/configs/tsconfig.json",
    "compilerOptions": {
        "target": "es5",
        "lib": ["esnext"],
        "module": "esnext",
        "moduleResolution": "node",
        "rootDir": "./src",
        "strict": true,
    },
    "include": ["src" ],
    "exclude": [
        "node_modules",
        "**/tests/*",
        "dist"
    ]
}

package.json

{
  [...]

  "name": "vuito",
  "main": "dist/vuito.cjs.js",
  "module": "dist/vuito.esm.js",
  "types": "dist/index.d.ts",
  "sideEffects": false,
  "files": ["dist"],

  [...]
}
@rafgraph
Copy link
Owner

I was able to reproduce it, I think it's related to an updated dependency and "target": "es5". In the mean time Rollpkg v0.4.2 should work fine.

npm i --save-dev --save-exact rollpkg@0.4.2

@rafgraph
Copy link
Owner

The culprit was rollup-plugin-typescript2, I had to downgrade to v0.29.0. I just published Rollpkg v0.5.1, this should fix the issue.

@mathix420
Copy link
Author

Alright, thanks for your time and this great lib!
Have a nice day!

@rafgraph
Copy link
Owner

@mathix420 when you have a chance can you confirm that v0.5.1 fixes your issue, thanks.

@mathix420
Copy link
Author

Yes, v0.5.1 fixes this issue!
As my project gone more complex I ended up using a manual rollup config, but I created a branch with the rollpkg if you want to check https://github.com/mathix420/vuito/tree/rollpkg

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