Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(systemjs-bundling): include dependency name in bundle config #679

Merged
merged 1 commit into from
Jul 18, 2017

Conversation

simonfox
Copy link
Contributor

Bundle.getBundledModuleIds was only returning the ids of the traced files in the case of a package dependency. This change modifies DependencyInclusion to include the actual package name in the module ids for the dependency.

closes #676

`Bundle.getBundledModuleIds` was only returning the ids of the traced files in the case of a package dependency. This change modifies `DependencyInclusion` to include the actual package name in the module ids for the dependency.

closes aurelia#676
@JeroenVinke
Copy link
Collaborator

Thanks @simonfox! I tried this out and it does fix the error mentioned in #676 but I'm getting another one with this fix. This fix is still good though.

vendor-bundle.js:1395 Unhandled rejection Error: Module not already loaded loading "jquery" as http://localhost:9000/jquery.
  Instantiating http://localhost:9000/scripts/materialize-bundle.js
  Loading materialize-bundle
  Instantiating http://localhost:9000/aurelia-materialize-bridge
  Loading http://localhost:9000/aurelia-materialize-bridge
    at require (http://localhost:9000/scripts/vendor-bundle.js:6654:15)
    at eval (http://localhost:9000/scripts/materialize-bundle.js:10434:18)
    at eval (http://localhost:9000/scripts/materialize-bundle.js:26593:3)
    at eval (<anonymous>)
    at evaluate (http://localhost:9000/scripts/vendor-bundle.js:6606:16)
    at http://localhost:9000/scripts/vendor-bundle.js:7314:19
    at translateAndInstantiate (http://localhost:9000/scripts/vendor-bundle.js:7281:4)
    at http://localhost:9000/scripts/vendor-bundle.js:7199:14
    at runFetchPipeline (http://localhost:9000/scripts/vendor-bundle.js:7196:4)
    at http://localhost:9000/scripts/vendor-bundle.js:7078:16
    at http://localhost:9000/scripts/vendor-bundle.js:7077:8
    at SystemJSLoader$1.instantiate$1 (http://localhost:9000/scripts/vendor-bundle.js:7044:4)
    at http://localhost:9000/scripts/vendor-bundle.js:4473:31
    at resolveInstantiate (http://localhost:9000/scripts/vendor-bundle.js:4428:4)
    at SystemJSLoader$1.RegisterLoader$1.(anonymous function) (http://localhost:9000/scripts/vendor-bundle.js:4386:10)
    at http://localhost:9000/scripts/vendor-bundle.js:4065:39
    at SystemJSLoader$1.Loader.import (http://localhost:9000/scripts/vendor-bundle.js:4064:4)
    at SystemJSLoader$1.import (http://localhost:9000/scripts/vendor-bundle.js:7703:44)
    at http://localhost:9000/scripts/vendor-bundle.js:15706:29
    at DefaultLoader.loadModule (http://localhost:9000/scripts/vendor-bundle.js:15700:35)
    at _loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:14666:21)
    at http://localhost:9000/scripts/vendor-bundle.js:14659:16
    at loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:14658:75)
    at next (http://localhost:9000/scripts/vendor-bundle.js:14920:20)
    at <anonymous>
    at next (http://localhost:9000/scripts/vendor-bundle.js:14920:56)
    at http://localhost:9000/scripts/vendor-bundle.js:14927:16
    at FrameworkConfiguration.apply (http://localhost:9000/scripts/vendor-bundle.js:14912:44)
    at Aurelia.start (http://localhost:9000/scripts/vendor-bundle.js:14528:39)
    at Object.configure (http://localhost:9000/scripts/app-bundle.js:60:13)
    at http://localhost:9000/scripts/vendor-bundle.js:13429:29
    at config (http://localhost:9000/scripts/vendor-bundle.js:13424:56)
    at http://localhost:9000/scripts/vendor-bundle.js:13460:14
    at <anonymous>
    at bootstrap (http://localhost:9000/scripts/vendor-bundle.js:13459:26)
    at http://localhost:9000/scripts/vendor-bundle.js:13446:9
    at run (http://localhost:9000/scripts/vendor-bundle.js:13441:61)
    at Object.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:13466:37)
    at execute (http://localhost:9000/scripts/vendor-bundle.js:6737:28)
    at dynamicExecute (http://localhost:9000/scripts/vendor-bundle.js:4929:26)
    at doEvaluate (http://localhost:9000/scripts/vendor-bundle.js:4876:13)
    at ensureEvaluate (http://localhost:9000/scripts/vendor-bundle.js:4784:13)
    at http://localhost:9000/scripts/vendor-bundle.js:4406:14
    at http://localhost:9000/scripts/vendor-bundle.js:4405:6
    at SystemJSLoader$1.RegisterLoader$1.(anonymous function) (http://localhost:9000/scripts/vendor-bundle.js:4387:4)
    at http://localhost:9000/scripts/vendor-bundle.js:4065:39
    at <anonymous>
    at SystemJSLoader$1.Loader.import (http://localhost:9000/scripts/vendor-bundle.js:4064:4)
    at SystemJSLoader$1.import (http://localhost:9000/scripts/vendor-bundle.js:7703:44)
    at http://localhost:9000/:15:28
From previous event:
    at SystemJSLoader$1.Loader.import (http://localhost:9000/scripts/vendor-bundle.js:4069:9)
    at SystemJSLoader$1.import (http://localhost:9000/scripts/vendor-bundle.js:7703:44)
    at http://localhost:9000/scripts/vendor-bundle.js:15706:29
From previous event:
    at DefaultLoader.loadModule (http://localhost:9000/scripts/vendor-bundle.js:15700:35)
    at _loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:14666:21)
    at http://localhost:9000/scripts/vendor-bundle.js:14659:16
From previous event:
    at loadPlugin (http://localhost:9000/scripts/vendor-bundle.js:14658:75)
    at next (http://localhost:9000/scripts/vendor-bundle.js:14920:20)
    at <anonymous>
From previous event:
    at next (http://localhost:9000/scripts/vendor-bundle.js:14920:56)
    at http://localhost:9000/scripts/vendor-bundle.js:14927:16
From previous event:
    at FrameworkConfiguration.apply (http://localhost:9000/scripts/vendor-bundle.js:14912:44)
    at Aurelia.start (http://localhost:9000/scripts/vendor-bundle.js:14528:39)
    at Object.configure (http://localhost:9000/scripts/app-bundle.js:60:13)
    at http://localhost:9000/scripts/vendor-bundle.js:13429:29
From previous event:
    at config (http://localhost:9000/scripts/vendor-bundle.js:13424:56)
    at http://localhost:9000/scripts/vendor-bundle.js:13460:14
    at <anonymous>
From previous event:
    at bootstrap (http://localhost:9000/scripts/vendor-bundle.js:13459:26)
    at http://localhost:9000/scripts/vendor-bundle.js:13446:9
From previous event:
    at run (http://localhost:9000/scripts/vendor-bundle.js:13441:61)
    at Object.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:13466:37)
    at execute (http://localhost:9000/scripts/vendor-bundle.js:6737:28)
    at dynamicExecute (http://localhost:9000/scripts/vendor-bundle.js:4929:26)
    at doEvaluate (http://localhost:9000/scripts/vendor-bundle.js:4876:13)
    at ensureEvaluate (http://localhost:9000/scripts/vendor-bundle.js:4784:13)
    at http://localhost:9000/scripts/vendor-bundle.js:4406:14
From previous event:
    at http://localhost:9000/scripts/vendor-bundle.js:4405:6
From previous event:
    at SystemJSLoader$1.RegisterLoader$1.(anonymous function) (http://localhost:9000/scripts/vendor-bundle.js:4387:4)
    at http://localhost:9000/scripts/vendor-bundle.js:4065:39
    at <anonymous>
From previous event:
    at SystemJSLoader$1.Loader.import (http://localhost:9000/scripts/vendor-bundle.js:4064:4)
    at SystemJSLoader$1.import (http://localhost:9000/scripts/vendor-bundle.js:7703:44)
    at http://localhost:9000/:15:28

When I only have jquery in a bundle called "materialize-bundle" and do

import * as x from 'jquery';
console.log(x);

then it does not give any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

systemjs: getting "unexpected token <" when loading a lib from a separate bundle
2 participants