Comments (4)
Problem is associated with running the server side code before webpack is completed compilation. Additionally entire webpack is run when the webserver starts. Need to prevent this to resolve issue.
from jsstarterdocker.
Do you think a multi-stage docker build might help with this? I'm not 100% familiar with your custom webpack build but I know the baked in Angular bundling is an after effect of successfully compiling the server code.
Would it be possible to trigger the webpack build in the Dockerfile manually before starting the server code compilation?
https://docs.docker.com/develop/develop-images/multistage-build/#before-multi-stage-builds
Essentially what I'm saying is can we strip this functionality from the .csproj and put it into the Dockerfile?
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Message Importance="high" Text="Performing npm install..." />
<Exec Command="npm install" />
<Message Importance="high" Text="Creating ClientApp/dist directory..." />
<MakeDir Directories="ClientApp\dist\" />
<Message Importance="high" Text="Creating react-loadable.json file..." />
<WriteLinesToFile File="ClientApp\dist\react-loadable.json" Lines="{}" Overwrite="True" />
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.prod.js --env.prod" />
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.server.prod.js --env.prod" />
```XML
from jsstarterdocker.
@mtmulch I'd love to remove that setup from the .csproj file and into the docker build. I was trying to figure out at way to do that but no luck. I think this is one of the higher priorities for getting the project running correctly. Its a huge bug that the initial page load is an error message that requires a page refresh. Any help with trouble shooting/ PR is welcome. I would be stoked if this was resolved. 🌮
from jsstarterdocker.
@bharney Hello friend, starting a new job this week that I might finally be able to call home and back in my own place in Chicago. I'm gonna take a look at some of this stuff soon on some nights when I'm bored.
from jsstarterdocker.
Related Issues (20)
- SSR Fails on first page load for authenticated pages
- Allow user to Avoid Setting up KeyVault HOT 1
- Add Unit Tests to Docker build
- Webpack 4 runs entire webpack build on startup and HMR file change
- Add IdentityServer4 and hook into Identity Core HOT 1
- Add Settings page with Account and Profile tab features
- Admin panel administering Roles, Locking users out, and Impersonate user HOT 1
- Add Third Party sign in (Google, Github, Twitter) HOT 1
- Switch to Reach Router
- GDPR Compliant
- Upgrade to React 16.5 for Profiling HOT 1
- Profile Displays Broken Image if not profile image is uploaded
- Add Account Locked out after too many Login Attempts HOT 1
- Debug locally HOT 5
- Registration Confirmation Email should not be a protected route and fix typo HOT 1
- Update ARM Template to Setup KeyVault and make it a dependency requirement for all other resources
- Update README to Include npm global installs and KeyVault
- Update ARM Template to spin up Azure Resources for Docker Infrastructure
- Docker SQL Server Persistance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsstarterdocker.