Created
April 5, 2020 06:10
-
-
Save aliustaoglu/34abf32b865c1c942f0adb03059880c4 to your computer and use it in GitHub Desktop.
Vue Webpack Sourcemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
lintOnSave: false, | |
configureWebpack: config => { | |
if (process.env.NODE_ENV === 'development') { | |
config.devtool = 'eval-source-map'; | |
config.output.devtoolModuleFilenameTemplate = info => | |
info.resourcePath.match(/\.vue$/) && !info.identifier.match(/type=script/) // this is change ✨ | |
? `webpack-generated:///${info.resourcePath}?${info.hash}` | |
: `webpack-yourCode:///${info.resourcePath}`; | |
config.output.devtoolFallbackModuleFilenameTemplate = 'webpack:///[resource-path]?[hash]'; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment