adjust source map devtools filename template to point to source

Signed-off-by: Jacob Bolda <me@jacobbolda.com>
This commit is contained in:
Jacob Bolda
2021-05-27 17:15:33 -05:00
parent cbdc786d4b
commit b8321f0c36
+14 -1
View File
@@ -197,6 +197,15 @@ export async function createConfig(
chunkFilename: isDev
? '[name].chunk.js'
: 'static/[name].[chunkhash:8].chunk.js',
...(isDev
? {
devtoolModuleFilenameTemplate: info =>
`file:///${resolvePath(info.absoluteResourcePath).replace(
/\\/g,
'/',
)}`,
}
: {}),
},
plugins,
};
@@ -281,7 +290,11 @@ export async function createBackendConfig(
: '[name].[chunkhash:8].chunk.js',
...(isDev
? {
devtoolModuleFilenameTemplate: 'file:///[absolute-resource-path]',
devtoolModuleFilenameTemplate: info =>
`file:///${resolvePath(info.absoluteResourcePath).replace(
/\\/g,
'/',
)}`,
}
: {}),
},