Skip to content

Production build cannot bootstrap #1010

Closed
@petoknm

Description

@petoknm

The problem

When I try to add some libraries like jQuery, Bootstrap, toastr and bootbox, the production build cannot bootstrap the application. So I am left with "Loading..." on the page. The build is fine, no errors The development version works fine.

screenshot from 2016-06-05 00-10-37

One thing which I have noticed is that it doesn't even fetch the app/index.js like the dev build does. So I suspect it craps out somewhere before. possibly main.js. main.js now probably contains all the library code so that might have something to do with it.

OS

Linux x64, Fedora 23

Versions

angular-cli: 1.0.0-beta.5
node: 5.11.1
os: linux x64

Reproduction Steps

Create a new app
Add jquery, bootstrap, toastr (, bootbox) (with typings)
Add systemjs config (maps and packages)
Add the libraries to the vendorNpmFiles
Build production version

Repo showcasing the problem

Here you can check out all the changes that I made
https://github.com/petoknm/angular2-cli-issue2
EDIT 04/06/2016:
I found a simple workaround but I hope thats something that shouldn't be necessary
https://github.com/petoknm/angular2-cli-issue2/commit/a0b43a4442fb67d9aa4bdc68964b77bc6e8c6e4a
EDIT 05/06/2016:
I have a bigger app that had this problem and I was able to get it into various stages of "working". When I did the changes that should have fixed it, it still didn't work. So I started removing stuff so that it approached the simple app and it went from not working at all, to not bootstraping but toastr working, and then to working only after I removed almost everything (which sucks and therefore that fix cannot be used).
Thank you 😄

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