-
Notifications
You must be signed in to change notification settings - Fork 33
plugin-babel trying to load systemjs-babel-browser without preserving version in path #86
Description
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 )
1: express:router dispatching GET / +6s
2: express:router query : / +6ms
3: express:router expressInit : / +3ms
4: express:router dispatching GET /jspm_packages/system.js +41ms
5: express:router query : /jspm_packages/system.js +17ms
6: express:router expressInit : /jspm_packages/system.js +1ms
7: express:router trim prefix (/jspm_packages) from url /jspm_packages/system.js +0ms
8: express:router serveStatic /jspm_packages : /jspm_packages/system.js +1ms
9: express:router dispatching GET /config.js +3ms
10: express:router query : /config.js +1ms
11: express:router expressInit : /config.js +0ms
12: express:router dispatching GET /app/location.js +163ms
13: express:router query : /app/location.js +3ms
14: express:router expressInit : /app/location.js +0ms
15: express:router trim prefix (/app) from url /app/location.js +3ms
16: express:router serveStatic /app : /app/location.js +1ms
17: express:router dispatching GET /jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js +29ms
18: express:router query : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js +13ms
19: express:router expressInit : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js +1ms
20: express:router trim prefix (/jspm_packages) from url /jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js +0ms
21: express:router serveStatic /jspm_packages : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/plugin-babel.js +0ms
22: express:router dispatching GET /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +91ms
23: express:router query : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +3ms
24: express:router expressInit : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +1ms
25: express:router trim prefix (/jspm_packages) from url /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +0ms
26: express:router serveStatic /jspm_packages : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +3ms
27: express:router <anonymous> : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +4ms
28: express:router dispatching GET /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +5m
29: express:router query : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +2ms
30: express:router expressInit : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +0ms
31: express:router trim prefix (/jspm_packages) from url /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +0ms
32: express:router serveStatic /jspm_packages : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +1ms
33: express:router <anonymous> : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/ +2ms
34: express:router dispatching GET /jspm_packages/npm/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js +26s
35: express:router query : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js +2ms
36: express:router expressInit : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js +1ms
37: express:router trim prefix (/jspm_packages) from url /jspm_packages/npm/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js +1ms
38: express:router serveStatic /jspm_packages : /jspm_packages/npm/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js +0ms
39: express:router dispatching GET /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +14s
40: express:router query : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +12ms
41: express:router expressInit : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +0ms
42: express:router trim prefix (/jspm_packages) from url /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +1ms
43: express:router serveStatic /jspm_packages : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +0ms
44: express:router <anonymous> : /jspm_packages/npm/systemjs-plugin-babel/systemjs-babel-browser.js +1ms
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.
Whats going on here?

