This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
0.15.22 regression: external requires are mapped to the main file #648
Comments
so the fix in eabc810 wasn't perfect, it seems |
adamburgess
changed the title
0.15.22 regression: default external requires are normalised
0.15.22 regression: default external requires are mapped to the main file
Jul 21, 2016
adamburgess
changed the title
0.15.22 regression: default external requires are mapped to the main file
0.15.22 regression: external requires are mapped to the main file
Jul 21, 2016
@adamburgess right, we should extend the function The package lookup is provided at https://github.com/systemjs/builder/blob/master/lib/utils.js#L302 so this should be as simple as something like: var packageName = getPackage(loader.packages, loader.decanonicalize(canonicalName));
var packageMain = packageName && loader.packages[packageName].main;
if (packageMain && canonicalName.substr(canonicalName.length - packageMain.length - 1) == '/' + packageMain)
canonicalName = canonicalName.substr(0, canonicalName.length - packageMain.length - 1); |
guybedford
added a commit
that referenced
this issue
Jul 26, 2016
Added in 5e72725. |
Released in 0.15.24. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
input file: app.js
0.15.21 build to
cjs
withreact
as external:jspm build app.js --format cjs --externals react
As you can see, it require's
react
, as expected.0.15.22 build to
cjs
withreact
as external:jspm build app.js --format cjs --externals react
Here it erroneously require's
react/react.js
.The bug is still there in 0.15.23.
The text was updated successfully, but these errors were encountered: