These are chat archives for systemjs/systemjs

28th
Oct 2017
Shashi Gowda
@shashi
Oct 28 2017 04:00
Hi, what is the best way to load b.js and c.js after a.js? Here b and c can be loaded concurrently but only after a has been loaded... I couldn't figure out how to do this with SystemJS.import
Aluan Haddad
@aluanhaddad
Oct 28 2017 22:14
@shashi you can write
import a from './a';
(async function () {
  const [b, c] = await Promise.all(['./b', './c'].map(specifier => SystemJS.import(specifier));
  console.log(a, b, c);
}());

@davismj that sounds like you might be need to adjust your paths config. Did you run through the upgrade prompts? It is possible that some paths were not preserved as

import { Class } from 'module';

shouldn't have resolved to ./dist/module with or without a defaultExtension unless you had a base url of "dist/" or a wildcard "paths".

Matthew James Davis
@davismj
Oct 28 2017 22:26
I did have that before. My paths config doesnt work anymore.
I canceled halfway because I made a mistake and it didn't ask me again.
Aluan Haddad
@aluanhaddad
Oct 28 2017 22:27
you can run $ jspm init and start over
but I would just create a fresh configuration
Matthew James Davis
@davismj
Oct 28 2017 22:27
I'll give it a try. Is there something I can manually configure?
Aluan Haddad
@aluanhaddad
Oct 28 2017 22:28
Well, wildcards in paths are no longer supported, but they should not be needed for what you want.
Matthew James Davis
@davismj
Oct 28 2017 22:29
Tried paths: { ".": "dist/" } and a few others with no luck.
Aluan Haddad
@aluanhaddad
Oct 28 2017 22:30
did you try
SystemJS.config({
  paths: {
    "/": "dist/",
  }
});
Matthew James Davis
@davismj
Oct 28 2017 22:30
Yea.
"", ".", ". /", "/"
I
Aluan Haddad
@aluanhaddad
Oct 28 2017 22:31
hmm
Can you share the project?