These are chat archives for systemjs/systemjs

Jun 2018
Bruno Filippone
Jun 22 2018 10:55

Does anyone know how to properly override the paths using System.config with a custom config on top of the default jspm.config.js generated by jspm?

I have a backend and the assets served by a different host/port, but when I override the paths to point to port 8000 rather than 8080 it only applies to the paths config and not all the entries in map and the packageConfigPaths, so nothing loads correctly...

Here's what I get after applying a simple System.config({ baseUrl: "...", paths: { ... } }) override after jspm.config.js is loaded:

Screen Shot 2018-06-22 at 11.49.19.png
baseURL and paths look correct but map and packageConfigPaths are wrong due to the paths config in jspm.config.js setting npm and github to load from /jspm_packages/....
These are my overrides for reference:
    baseURL: 'http://localhost:8000/dist',
    paths: {
        "npm:": "http://localhost:8000/jspm_packages/npm/",
        "github:": "http://localhost:8000/jspm_packages/github/"