-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng build --prod ignores js files in bower_component folder #1339
Comments
What's the output of |
v1.0.0-beta.8 |
Assuming you added them to |
@Splaktar there's a way to install this master? |
@BenevidesLecontes sure, there are multiple ways. Here is one that should work:
I haven't tested it though since I'm still using my forked version here: |
@Splaktar this master only copy js files when I do ng serve or ng build, but when I do ng serve with |
@BenevidesLecontes Yes, I see those directory not empty errors as well. I usually have to run After running the command multiple times and getting it to succeed, the files |
@Splaktar can you paste here how you setup jquery or boostrap in your angular-cli-build and system-config? |
I'm not using either of those fortunately, but I can point you to how to setup angular2-polymer w/ the angular-cli which is putting the files in Take note of the
|
I'm on angular cli 1.0.0.-beta.9 As soon as the application loads I have this issue: I've setup an elements.html file with all my bower_component imports and added webcomponentsjs to the index.html file. Also placed all bower_components in public/bower_components. This isn't an issue at all with dev, just with prod. The issue with webcomponentsjs is probably due to the bundling of the js files, but I'm not sure what the best way to handle that is for bower_components. I also narrowed down the missing web-animations-next-lite.min.js to these to import in my elements.html file. Commenting them out will avoid the error message |
Confirmed that this is working in I had to do the following to get that working properly: Change:
To:
Hopefully I'll have time to make a blog post next month on my full angular-cli SCSS config. Of course I imagine that by then, it'll all be irrelevant due to the webpack breaking changes. |
@Splaktar Thanks for the reply. The issue seemed to go away after updating to beta10 and starting from scratch on my app, reinstalling node modules and bower componets and then doing a production build. thanks! |
Yes, if you have a mix of beta.9 and beta.10 installed, sometimes it won't work. Following the angular-cli upgrade procedure tries to help avoid this kind of thing. |
I am using beta 10 and this issue is still there. I am using jquery and bootstrap and while running ng build --prod or ng serve --prod it ignores .js files. Please tell me what else needs to be done to make it work ? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi
I added some bower components to my app and when I build in dev mode every thing works fine.
However, when I build in prod mode, every js file is ignored.
The text was updated successfully, but these errors were encountered: