1
0
Fork 0
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:
Tim Neutkens 2018-03-23 17:10:09 +01:00
parent 7bef864a6f
commit 14a16924c5

View file

@ -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: {