-
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
Production build service problem #953
Comments
I can confirm that I've seen the same problem. None of my angular-cli generated services or pipes end up in the dist/app folder when using the -prod option. These files show up as expected using the default (nothing explicitly specified, so defaults to dev) or explicitly specifying -dev. I am using [email protected]. Since @petoknm says this issue still exists in the current version 1.0.0-beta.5, I have not tried upgrading. |
I can confirm the problem still exists in 1.0.0-beta.5. |
I have just battled against this issue, I added all my files to the index.ts file for applicable sections ("articles/index.ts", "users/index.ts") and updates all the imports. Also for the main app bootstrapping when declaring global services I exported them from the main index file "app/index.ts". This fixed most things although I personally forgot to then order my files based on how things export and the order in which they do so. Now I am trying to figure out why the cli removes my js files from my public folder and where it puts them lol |
@borntodesign is right - the issue was that the services should not be added to Most app files shouldn't appear on @borntodesign can you open a new issue for the js files in vendor? I think they should be copied over. |
#1028 was merged in and should be included in beta.6. It should reduce alleviate the scenarios where bundling is broken between |
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. |
I am trying to use a generated service in the main component. When I try to use a generated service in dev environment everything is fine. But when I switch to production is cannot find the service =>
GET http://localhost:4200/app/flights.service.js 404 (Not Found)
. The service is not present in the dist folder. Am I doing something wrong? Build is successful but for some reason the service is not there. If it is being bundled into index.js then it should not be requested from flights.service.js, right?OS: Linux x64, Fedora 23
ng-cli : 1.0.0-beta.5
node: 5.11.1
Reproduction Steps:
Generate a new app using
ng new ng-app
Generate a new service using
ng g service flights
Then use the service in the app by adding it to the bootstrap list of dependencies and injecting it into the main component.
Serve it in production mode
ng serve -prod
Load the app in the browser =>
GET http://localhost:4200/app/flights.service.js 404 (Not Found)
The app that shows the problem: https://github.com/petoknm/angular2-cli-issue
Thank you 😄
The text was updated successfully, but these errors were encountered: