facebook

webpack Configuration Question

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #583498 Reply

    Joe
    Participant

    I 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.

    #583761 Reply

    support-tony
    Keymaster

    Joe,

    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 a dist 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.

    #583882 Reply

    Joe
    Participant

    Thanks 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?

    #584290 Reply

    support-tony
    Keymaster

    Joe,

    We make use of ng serve and this serves the files from memory, not from disk. However, you can also run ng eject which takes many of the same arguments as ng serve and this will output the webpack config file to the root folder of the project (by default). For more info on ng eject please see the official documentation.

    I hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: webpack Configuration Question

You must be logged in to post in the forum log in