Hello Angular-Cli Folks!
I am having trouble getting static JS files (like jquery components for a static page) to copy over the dist folder in version 0.0.34.
Placing the JS folder in the client, or app/assets does nothing, and they are just skipped. Other non JS files are not however in these areas.
Let me know what is the right approach to have static JS files.
Hi @raghunat. Everything from the public/
directory gets copied as is to the dist/
.
I'm not finding this to be the case when the -prod flag is used. It seems like whenever a production build is done, js files inside of public are not included.
@JonGaribay I'm having this issue too. I'm using bower files on public folder, but js files are not included on dist folder when use ng serve -prod, only the .map are included
@jkuri this is still happening. Public JS files are not copied when using the -prod flag
Not sure this is exactly the same but I load an HttpInterceptor from the main.ts that doesn't seem to be getting copied when using the build for production environments.
// main.ts
import {HttpInterceptor} from './app/shared/http/http.interceptor';
Everything builds fine but when loading the web page I get:
zone.js:101 GET http://localhost:4200/app/shared/http/http.interceptor.js 404 (Not Found)
I have tried commenting out this line and am now experiencing no build or console issues.. but the application does not load..
@jkuri I am also seeing this. The javascript files in my public folder are not getting copied over.
@jkuri this issue should be reopened. I can replicate on latest master with -prod flag set, nothing in the vendor folder is getting copied to dist.
I added in https://github.com/angular/angular-cli/pull/1129 that should address this issue. If it's accepted, it should be in the next beta.
We are having the same problem. Any idea when this will be fixed?
I agree. This seems like an obvious fix and there have been no comments in the PR about there being a problem. Why has this sat for almost a month without getting merged? It missed beta.9.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
I'm not finding this to be the case when the -prod flag is used. It seems like whenever a production build is done, js files inside of public are not included.