Open ericnewton76 opened 6 years ago
I'm wondering if this is a SystemJS problem or plugin-babel incorrectly specifying its requires/imports?
I updated the title because I just noticed this is also happening during a gulp bundle building task, so I'm seeing the same behavior in nodejs using the same config.js.
nm, I found the offending line in config.js which was quoted as to be used, which of prevents success because the mapping of systemjs-babel-build has the version removed and therefore won't be found.
System.config({
/*snip*/
map: {
"plugin-babel": "npm:systemjs-plugin-babel@0.0.25/plugin-babel.js",
"plugin-babel-runtime": "npm:babel-runtime@5.8.38",
"systemjs-babel-build": "npm:systemjs-plugin-babel/systemjs-babel-browser.js",
/*snip*/
is jspm supposed to be loading the version numbers into the tree, and thereby forcing a huge map section?
I'm new to Babel, React, and SystemJS. Basically inherited a project that uses all this and trying to get things running in the browser. They used bundles for production, but are not being helpful due to contract/work dispute.
My attempts to get things working have been good up until a problem with running in the browser, and plugin-babel passing control(?) or importing 'systemjs-babel-browser' which makes sense, but problem is that the actual network request has the version string dropped, and so generates a 404 error when trying to load that dependency.
Given the following express static debug log: (ie
set DEBUG=express:* & gulp serve
)notice how the initial request by systemjs is to
/jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js
and succeeds (shown via lines 17-19)However, plugin-babel does an import for systemjs-babel-browser, but the request drops the version string
@0.0.25
and tries to have the browser download/jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js
which fails.Here's chrome network tab:
Whats going on here?