Closed itsweliton closed 5 years ago
I kinda remember running into that while I was beating my head to get webpack configâd to output the right module format to be systemJs compatible... ârescriptsâ was a real breakthrough for me to be able to override CRAâs native webpack module format to âAMDâ so that systemJs was able to consume.
My best advice (admittedly not a targeted answer) is leverage the sample as a known working scenario that you can incrementally diverge from... get the sample running as is, see how the JS bundles wind up looking in that happy path and then mirror that in your preferred alternative approach
I get not wanting to take on the additional complexity of TS vs plain jane JS, but i would encourage you to embrace TS if youâre on the fence... it seems very likely to stick around, itâs got solid big vendor support in all 3 big camps - MSFT, Facebook React and the native choice in Googleâs angular infrastructure
I'm aware of the TS extensive use, and I plan to change the project soon, but now, I couldn't do it.
So, I end up finding the main problem, actually this error happens because when you try to access the project's URL, it's going to load the project without the systemJS, but only with webpack, and therefore it doesn't work. Once I try to access from the s-spa env, it works properly (once it's using the systemjs)
Now I'm facing the LOADING_SOURCE_CODE: "does not export an unmount function or array of functions
error event with the .default
as you explained in README.md. I'm not sure what is triggering it, but I'll keep digging it.
Thanks for your help @Beej126!
Hi @Beej126, it's me again đ
I'm facing some trouble with this s-spa with cra. I have a set up exactly as yours but using .js instead of .ts (even the same react-scripts version)
however, when I try to run my subproject I got
Uncaught ReferenceError: define is not defined
. Have you faced anything like this? any idea?.I saw on StackOverflow that I should import Requirejs to my project, but when I tried that, the application wouldn't load, only showing a blank page and no errors on the console.