Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 22 06:51
    naltatis commented #2267
  • Oct 22 05:09
    joeldenning commented #2269
  • Oct 22 03:55
    hefeng6500 opened #2269
  • Oct 22 00:03
    joeldenning opened #2268
  • Oct 21 21:34
    guybedford labeled #2267
  • Oct 21 21:34
    guybedford commented #2267
  • Oct 21 21:10
    naltatis opened #2267
  • Oct 17 17:05
    Jack-Works commented #2265
  • Oct 17 16:36
    guybedford closed #2265
  • Oct 17 16:36
    guybedford commented #2265
  • Oct 17 16:19
    Jack-Works commented #2265
  • Oct 17 14:50
    guybedford commented #2265
  • Oct 17 14:26
    Jack-Works commented #2265
  • Oct 12 17:42
    joeldenning commented #2250
  • Oct 12 10:34
    guybedford edited #2013
  • Oct 12 10:32

    guybedford on 6.7.1

    (compare)

  • Oct 12 10:32

    guybedford on master

    6.7.1 (compare)

  • Oct 12 10:30

    guybedford on autoimport-race

    (compare)

  • Oct 12 10:30

    guybedford on master

    autoimport race (#2266) (compare)

  • Oct 12 10:30
    guybedford closed #2266
Frank Lemanschik
@frank-dspeed
but the set will as you found out may or may not get uesed
depends on your code
Guy Bedford
@guybedford
@eddneal we do both because we want to ensure scripts are loaded as soon as possible. This does bring up an interesting feature idea though, if we should support eg defer on type=systemjs-module for your use case. I would in general think that this would be unadvisable though since any delay = direct performance issues for the user (especially since these scripts aren't preloaded by the browser preloader as it does not understnad them).
1 reply
Perhaps you could explain a little more about your use case why this is necessary
@stevenvachon System.set should be set with full URLs usually if you can. prepareImport is just for loading the import map initially. Updating the import map after that prepareImport is a use case we have yet to support, but are currently matching what browser import maps provide.
4 replies
Guy Bedford
@guybedford
Exactly - import maps spec is now frozen and doesn’t support updates
It does support dynamic injection before the first module load, but so does systemjs
After the first module load they are frozen
I’ve created http://github.com/guybedford/import-maps-extensions to get movement on new spec work for these sorts of cases
Will post to WICG when import maps unflag
Steven Vachon
@stevenvachon
oh
so, then you wouldn't be interested in a PR
@guybedford if you're aware of any hacks i can use (i'm using jest), please post them to the github issue i created
Akanksha Singh
@Flamingo09
Hello everyone. I need help. I'm using systemJS with import map inside my react application to load certain external modules (micro front end modules) . I have configured cors in my webpack-dev-server. Still it's throwing cors access not allowed error. Any idea, on how to fix it?
@hiaparna I'm using same single-spa for microfrint end, but getting cors error when importing modules using systemJS. Can you please help me, on how you did it.
Jari Germeraad
@jari_germeraad_gitlab

Hey everyone!

We're currently using SystemJS' Import Maps with single-spa and we were wondering whether we can add a header to the requests done by SystemJS (if I'm not mistaken?)!
It would be a custom header.

Any thoughts? Thanks!

Frank Lemanschik
@frank-dspeed
it is possible you can add a modifyed loader
or you use serviceworkers
both are good methods
ehm sorry
serviceworkers :)
thats the right term
Guy Bedford
@guybedford
@jari_germeraad_gitlab custom headers aren't supported for script tags in browsers, but you could do this by using a fetch loader and then cutomizing the fetch request. You can use the module types extra and then set the shouldFetch hook to always return true in https://github.com/systemjs/systemjs/blob/master/docs/hooks.md#shouldfetchurl---boolean. Then hook the fetch call as well itself to add the extra headers you need.
Michiel Vermandel
@resolvethis
Hi, I want to use SystemJS 6 to build a plugin system in Angular. Almost any example uses SystemJS 0.2x. Is it possible to achieve the same as describes in this SO question with SystemJS6? https://stackoverflow.com/questions/60284943/updating-systemjs-from-0-21-to-6-x-with-webpack => The thing I do not know to migrate is the SystemJS.newModule, as it does not exist in SystemJS 6 anymore. Any advice would be greatly appriciated!
Guy Bedford
@guybedford
@resolvethis you can use System.set instead of System.registry.set, then you likely want to use a resolved URL for those dependencies configured via an import map.
If you look for System.set examples in the issue queue I'm sure you should find a similar answer
For example see systemjs/systemjs#2152
Michiel Vermandel
@resolvethis
Thanks a lot, I managed to get it working! See https://stackoverflow.com/a/63917606/2528609 for details
charliematters
@charliematters
Hello! I'm sorry this is a super-old question, but we're using 0.21.0 as part of a dynamically fetched system and I'm trying to work out how to externalise react and react-dom. The outer application is built using webpack, and I've got that happily putting the UMD builds of react/dom as script imports in the html file, but I'm not sure how I can tell systemjs that import React from 'react' is already provided and doesn't need fetching. Any ideas?