Closed arman-mukatov closed 3 years ago
how can I get the require call on the server side to work?
Only *.js
/ *.json
requires work on server side.
Anything more than that requires using a bundler like Webpack, or a framework that uses a bundler internally.
I use webpack v5, but how to return the real path to the image or css on the disk on SSR?
By using a file-loader
.
They seem to have renamed it to something else in v5, like "webpack assets".
This is for the client-side, but what about the server-side?
This is for the server side
They had target: "node"
parameter or something like that.
I want to start a new big project where I am not using isomorphic/universal-webpack or next.js, how can I get the required call on the server-side to work?