JSPM Bundle with TypeScript transpiler

前端 未结 2 1060
无人及你
无人及你 2021-02-04 10:27

I\'m getting more into System.js and JSPM, where I\'ve come to the point where I want to bundle my TypeScript source code into a JavaScript bundle.

Now I can bundle my g

2条回答
  •  醉酒成梦
    2021-02-04 10:56

    I believe the question is getting out of date. I just tried this with JSPM 0.17.0-beta.31 with plugin-typescript (https://github.com/frankwallis/plugin-typescript), and "jspm bundle" did indeed pre-translate the TypeScript for me.

    "jspm bundle-sfx" is now "jspm build". Because the original accepted answer suggested switching to bundle-sfx (build), which should not be necessary now, I'd like to clarify the decision of whether to use bundle or build. I find bundle to be more useful for speeding up development, whereas build can produce a smaller file with more optimizations, so you may want to use bundle during development and build when you release. Be aware that if you use build on a library, code that imports your library will be unable to share its dependencies.

提交回复
热议问题