These are chat archives for systemjs/systemjs

1st
May 2016
Sharon (Sean) Rolel
@Mosho1
May 01 2016 00:30
has anyone tried using systemjs with npm rather than jspm?
λex Vincent
@alexisvincent
May 01 2016 15:20
@Mosho1 Yep, This is a problem for a few reasons
How are you wanting to do this
Micah Zoltu
@MicahZoltu
May 01 2016 17:33
I have .html files sitting next to me .ts files in my source folder. JSPM 0.17 is correctly serving my .ts files and transpiling them in the browser, but it is also transpiling my .html files as .ts which results in invalid files loaded into the browser.
What do I need to do to tell SystemJS that only .ts files in my source folder should be run through the typescript plugin?
packages: {
    "source": {
        "meta": {
            "*.ts": {
                "loader": "plugin-typescript"
            }
        }
    }    
}
I would have thought that the *.ts meta thing would make it so only typescript files were transpiled but that doesn't seem to be the case.
Micah Zoltu
@MicahZoltu
May 01 2016 19:02
Is far as I can tell, defaultExtension doesn't actually work.
SystemJS.config({
  baseURL: "/",
  paths: {
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*",
    "*": "source/*"
  }
  transpiler: "plugin-typescript",
  packages: {
    "source": {
      format: "esm",
      defaultExtension: "ts",
      meta: {
        "*.html": {
          loader: "text"
        },
        "*.ts": {
          loader: "plugin-typescript"
        }
      }
    }
  }
});
When the app asks for app I would expect it to resolve the path, which will redirect to source/app. Then it should locate the package and notice the defaultExtension of ts turning it into source/app.ts. Then it should fall through to the meta and evaluate it as a TypeScript file and use the plugin.
However, instead the app tries to fetch source/app (which doesn't exist).
Micah Zoltu
@MicahZoltu
May 01 2016 19:10
No matter what I do I can't get defaultExtension to do anything.
Micah Zoltu
@MicahZoltu
May 01 2016 19:21
Bleh. I think I am going to have to give up on JSPM 0.17. I can't get any of it to work correctly. :/
I was really looking forward to peer dependencies too. :/
Micah Zoltu
@MicahZoltu
May 01 2016 19:40
Is it possible to use unminified SystemJS?
Since getting answers to problems has a very slow turn-around, I would like to be able to self-help by stepping through the source.
To answer my own question: swap out jspm_packages/system.js with jspm_packages/system.src.js.