flaviait / ng2-jspm-template

A template for a quick development workflow with angular 2 and jspm
MIT License
14 stars 3 forks source link

question, why using transpiler: 'plugin-babel',? #36

Closed born2net closed 8 years ago

born2net commented 8 years ago

I really wanted to use this project as my baseline but I just don't like the fact that we are using bablel. I am wondering if it's possible to convert everything to pure typescript as babel is not really needed anymore right? or am I missing something.

this is my current project https://github.com/born2net/ng2Boilerplate

As you can see it's pretty popular with over 500 stars and I want to set yours as the baseline but I just can't get over the whole Babbel thing :/

tx

Sean

born2net commented 8 years ago

just fyi

after spending 2 days trying to fix jspm with bundling I was finally able to fix it, in jspm you need to remove from packages the statement of :

packages: {
 "@angular/common": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/compiler": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/core": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/http": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/platform-browser": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/platform-browser-dynamic": {
            "main": "index.js",
            "defaultExtension": "js"
        },
        "@angular/router": {
            "main": "index.js",
            "defaultExtension": "js"
        }
        ...

I have no idea what changed in ng2 prior to rc.6 that would require this removel, but here you go, this fixes it and now I can FINALLY run:

jspm bundle app/main ./dist/index.js --minify --skip-source-maps

hopes it helps someone

Sean