![]() ![]() ![]() You can clone my (very basic) project as it stands if you think you can help: git clone Now, when I run electron electron-main.js the app starts and index.html is loaded but I get failures for everything else - my main.js and modules located in node_modules I then installed Electron and added electron-main.js from this quick start I've set up a simple Angular project based on this article and it runs fine in a browser. If anyone knows the reason, I'm all ears.Įlectron can't find resources I am trying to build a super simple app with Angular and Electron and to set it up as much from scratch as I can (just for learning purposes). I'm still curious why this it was an issue on Debian Jessie but not on OSX. Updating the tsconfig.json file so that it automatically excludes the node_modules directory sped up webpack immensely. This comment on the AngularCLI issue "ng serve not detecting file changes" solved the issue. However, given that the eject option isn't supported in ng 6, I'd prefer not to go down this road.Īny ideas on how I can speed up the compilation time for this ng app? There are a few suggestions about modifying the config to speed things up, e.g. I've done some research and it looks like there's an option to run ng eject, which would enable me to customize the webpack config. That should mean that there are no issues syncing node modules on the host machine with what's in the image. The node_modules directory is excluded from my Docker image, so when Docker builds, it populates its own node_modules directory inside the image. Changing a file is almost immediately noticed in the container.īut things aren't as snappy for the ng container. I tried the solution mentioned here, about opening up the port for webpack hot reloads and adding the port number inside docker-compose.yml but I saw no difference in behavior. That same build process takes way longer when it's part of a hot reload. (ng build -aot), it takes about 2 minutes. If I run the build process manually in a bash session for the ng container, The services come up fine when I run docker-compose up -build but any changes to the front end files take nearly an hour to trigger a hot reload. Why is Live Reload Slow for Angular app in Docker? - angular I'm running a Rails backend with Angular front end inside of a Docker image. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |