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 + rollup => es5 bundle? #1921

Closed
sod opened this issue Jun 17, 2016 · 3 comments
Closed

TypeScript + rollup => es5 bundle? #1921

sod opened this issue Jun 17, 2016 · 3 comments

Comments

@sod
Copy link
Contributor

sod commented Jun 17, 2016

Version: jspm 0.17.0-beta.22

I did a typescript rollup build test. For rollup to work with typescript I have to set https://github.com/sod/jspm-rollup/blob/master/jspm.config.js#L3

  typescriptOptions: {
    "target": "es2015"
  },

That works, but I end up with a bundle that only runs in es2015 compatible browsers. Is there a switch to convert the bundle to es5? Or should I just postprocess the bundle via babel myself?

@sod
Copy link
Contributor Author

sod commented Jun 17, 2016

Nevermind, found microsoft/TypeScript#6319 and related tickets that you are on it 👍

@sod sod closed this as completed Jun 17, 2016
@sod
Copy link
Contributor Author

sod commented Jun 17, 2016

Aaaaand typescript just merged support for output "everything es5 + es6 modules" 🎉

microsoft/TypeScript#9042

Scheduled for TS2.0 ... part of nightly.

So this does indeed work (produces a rollup'ed es5 compatible build):

  typescriptOptions: {
    "target": "es5",
    "module": "es2015"
  },

with jspm install github:frankwallis/plugin-typescript -o "{dependencies:{typescript:'^1.9.0-dev'}}"

@guybedford
Copy link
Member

Thanks for the update! Automatic support is tracking in frankwallis/plugin-typescript#97.

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