Answer the question
In order to leave comments, you need to log in
How should production build work with SSR?
I have a build with express-handlebars, during development I have the server run through server file and webpack-dev-middleware. All my handlebars files go through, in fact, not through webpack, but through express-handlebars, on the server the files are compiled into html and I see the result. The question is, how should this work through the prod assembly? What should I have as an output, untouched handlebars files + other processed files or rendered ready html? If everything depends on the project structure and assembly, I can attach the assembly code, servers and additional screenshots.
In general, I’m still a layout designer, I haven’t been to work and have never participated in projects, so I don’t know how more or less large projects are arranged in general.
Answer the question
In order to leave comments, you need to log in
Got the joke. You need a separate webpack config for the server. the server is generated first, then the rest of the files. a webpack config is "sewn up" to the server for development, which also monitors the resources, generates neighboring files when changed. Made according to this guide . If interested, here is the repo .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question