Enable server sourcemaps (#2242)

* add sourcemaps for server code

* leave dev config alone
This commit is contained in:
Deepak Prabhakara 2024-02-01 17:28:29 +00:00 committed by GitHub
parent 26533d72ec
commit 47a12d269f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,12 @@ module.exports = {
reactStrictMode: true,
i18n,
output: 'standalone',
webpack: (config, { webpack, isServer }) => {
webpack: (config, { dev, webpack, isServer }) => {
// Enable source maps in development mode and for server-side rendering
if (!dev && isServer) {
config.devtool = 'source-map';
}
if (isServer) {
// Module not found
config.plugins.push(