These are chat archives for systemjs/systemjs

Mar 2018
Shashi Gowda
Mar 11 2018 15:37
I have a dumb question...
I'm trying to load codemirror and lazy load the mode file for the language based on user request...
But get
VM769:2572 Uncaught (in promise) Error: Fetch error: 404 Not Found
  Instantiating http://localhost:8888/pkg/CodeMirror/node_modules/codemirror/lib/codemirror
  Loading http://localhost:8888/pkg/CodeMirror/node_modules/codemirror/mode/julia/julia.js
  Loading /pkg/CodeMirror/node_modules/codemirror/mode/julia/julia.js
It's trying to access http://localhost:8888/pkg/CodeMirror/node_modules/codemirror/lib/codemirror but only http://localhost:8888/pkg/CodeMirror/node_modules/codemirror/lib/codemirror.js is present. I presume this is because julia.js file begins with
(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror"], mod);
  else // Plain browser env
})(function(CodeMirror) {
How do I make SystemJS resolve relative imports like this correctly?
Ádám Lippai
Mar 11 2018 18:34
Is it possible to load ESM modules (with export {foo}) without using a transpiler? (e.g. using import() etc)