These are chat archives for systemjs/systemjs

Jun 2018
Jun 28 2018 20:03

Hi, I'm learning systemjs, and now want to initalize my aurelia app with systemjs,
In my index.html file I started app with following line


But this request cause it to be 404, because browser request file like this : localhost/aurelia-bootstrapper
so I added a mapping to systemjs.config file

        "aurelia-bootstrapper": "node_modules/aurelia-bootstrapper/dist/amd/aurelia-bootstrapper.js",

Then file is successfully loaded on browser but then all dependencies failed with 404, because now all of them requested from: /localhost/moduleName
so I started to add all dependencies to the mapping


    map: {
        "plugin-typescript": "node_modules/plugin-typescript/lib/",
        "typescript": "node_modules/typescript/",
        "aurelia-framework": "node_modules/aurelia-framework/dist/amd/aurelia-framework.js",
        "aurelia-binding": "node_modules/aurelia-binding/dist/amd/aurelia-binding.js",
        "aurelia-bootstrapper": "node_modules/aurelia-bootstrapper/dist/amd/aurelia-bootstrapper.js",
        "aurelia-dependency-injection": "node_modules/aurelia-dependency-injection/dist/amd/aurelia-dependency-injection.js",
        "aurelia-event-aggregator": "node_modules/aurelia-event-aggregator/dist/amd/aurelia-event-aggregator.js",
        "aurelia-fetch-client": "node_modules/aurelia-fetch-client/dist/amd/aurelia-fetch-client.js",
        "aurelia-http-client": "node_modules/aurelia-http-client/dist/amd/aurelia-http-client.js",

But it looks like there is no end to add all dependencies(and their dependencies).

How are you using systemjs for your pojects, am I going on wrong way?
Also its very hard to find the correct path to the js file in packages dist folder, it looks very annoying to write all these thing to config, is there any shortcut for this mapping?