Skip to content

Loading 3rd party library using System.js #1204

Description

@Memeplexx
  1. OS
    Linux Ubuntu 64
  2. Versions.
    node: 5.8.0
    os: linux x64
  3. Repro steps
    Until now, to load 3rd party libraries (like jQuery), I've simply:
  • added my jQuery reference to the vendorNpmFiles array inside angular-cli-build.json:
module.exports = function(defaults) {
return new Angular2App(defaults, {
vendorNpmFiles: [
'jquery/dist/jquery.min.js',
]
});
};
  • included a reference in my index.html:
<script src="vendor/jquery/dist/jquery.min.js"></script>

However, after building and serving to production, I see my jquery isn't pulling through (no doubt because system.js hasn't been aware of it). I've been struggling to get the system.js build system to pick up jQuery (even after following these examples). Precisely, what are the modifications I need to make to system-config.js to pick it up?
Thanks in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions