Tagged: angular webpack config
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by support-tony.
-
AuthorPosts
-
JoeParticipantI have a relatively simple app I’ve built with the Angular IDE. It runs fine when I run it via ng serve on localhost:4200.
I’ve been working on deploying this app to an application server, and I can’t get it to work. I tried pulling the bundle files generated by the Angular IDE and deploying those and they work well except for styling. I think that is because the files the Angular IDE generates don’t know about my web app name, which makes sense.
Is there anyway for me to get at or see the webpack config that the IDE is using? Or maybe the package.json if it is using something other than what I have. Being able to see that would allow me to see the difference between my app running locally and running on the server.
Any help appreciated.
support-tonyKeymasterJoe,
It’s not clear how you are trying to deploy to a server. Angular IDE doesn’t have tooling to help with this directly but you can run
ng build
from a Terminal+ session for the project, which will create adist
folder, the contents of which can be copied to a server. For more information on this, please refer to the official Angular documentation.Please let us know how you get on.
JoeParticipantThanks for this. I’m packaging my files with webpack for deployment under Weblogic 12. My build deploys OK, but I get errors when trying to run it. Either the injectable services won’t start, or I get errors on the CSS depending on the webpack config I use. Running my code via ng serve on the local host works perfectly. Deploying the code generated by your IDE works with a few glitches that could be worked out. I think those glitches has to do with path differences.
I was hoping maybe you would share the webpack config file you use and/or the package.json if it doesn’t use mine. Is there a way to get at those?
support-tonyKeymasterJoe,
We make use of
ng serve
and this serves the files from memory, not from disk. However, you can also runng eject
which takes many of the same arguments asng serve
and this will output the webpack config file to the root folder of the project (by default). For more info onng eject
please see the official documentation.I hope this helps.
-
AuthorPosts