Maybe I'm misinterpreting what source maps should do in a Vue app, but shouldn't I get the *.vue file line number where the error is occurring? I always get a refernce to a line number in a vue.runtime.esm.js file. It references the component, but the line number in the component file would be more helpful. Do I need to install additional source map modules?
My vue.config is below:
module.exports = {
assetsDir: "",
publicPath: "/",
css: {
sourceMap: true,
loaderOptions: {
sass: {
sassOptions: {},
},
},
},
configureWebpack: (config) => {
if (process.env.NODE_ENV === "development") {
config.devtool = "eval-source-map";
config.output.devtoolModuleFilenameTemplate = (info) =>
info.resourcePath.match(/^\.\/\S*?\.vue$/)
? `webpack-generated:///${info.resourcePath}?${info.hash}`
: `webpack-yourCode:///${info.resourcePath}`;
config.output.devtoolFallbackModuleFilenameTemplate =
"webpack:///[resource-path]?[hash]";
}
},
};
This also doesn't work:
configureWebpack: (config) => {
config.devtool = "source-map";
},
