You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty sure it's because my server bundle is not being used (I'm using server-side rendering with HMR).
webpackConfig.js
if(process.env.WEBPACK_DEV_SERVER||process.env.CLIENT_BUNDLE_ONLY){// eslint-disable-next-line no-consoleconsole.log('[React on Rails] Creating only the client bundles.');result=clientConfig();}elseif(process.env.SERVER_BUNDLE_ONLY){// eslint-disable-next-line no-consoleconsole.log('[React on Rails] Creating only the server bundle.');result=serverConfig();}else{// default is the standard client and server build// eslint-disable-next-line no-consoleconsole.log('[React on Rails] Creating both client and server bundles.');result=[clientConfig(),serverConfig()];}
How do I make sure pre-rendering on the server-side is using this process.env.SERVER_BUNDLE_ONLY flag?
The text was updated successfully, but these errors were encountered:
The process.env.SERVER_BUNDLE_ONLY is used only for building the server bundle when using the webpack-dev-server, so this is not relevant to your production setup.
Your gist error message does not show the source of the error.
I'm able to get pre-rendering working fine locally but I have issues in production.
Here's the error I see.
https://gist.github.com/Overload119/908f96279a537d84a1da9fec5a877a83
I'm pretty sure it's because my server bundle is not being used (I'm using server-side rendering with HMR).
webpackConfig.js
How do I make sure pre-rendering on the server-side is using this process.env.SERVER_BUNDLE_ONLY flag?
The text was updated successfully, but these errors were encountered: