mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Make sourcemap paths relative in production
This commit is contained in:
parent
7bef864a6f
commit
14a16924c5
|
@ -136,7 +136,13 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
|
|||
// This saves chunks with the name given via require.ensure()
|
||||
chunkFilename: '[name]-[chunkhash].js',
|
||||
strictModuleExceptionHandling: true,
|
||||
devtoolModuleFilenameTemplate: '[absolute-resource-path]'
|
||||
devtoolModuleFilenameTemplate (info) {
|
||||
if (dev) {
|
||||
return '[absolute-resource-path]'
|
||||
}
|
||||
|
||||
return `${info.absoluteResourcePath.replace(dir, '.').replace(nextDir, './node_modules/next')}`
|
||||
}
|
||||
},
|
||||
performance: { hints: false },
|
||||
resolve: {
|
||||
|
|
Loading…
Reference in a new issue