vue

mac2024-03-11  27

网上很多说vue打包时在config的index.js中加入productionSourceMap: false,然而并没有什么用,该有的map文件还是出现了! 解决方案 在vue.config.js中module.export = {}中加入一行 productionSourceMap: false,

下面是例子

module.exports = { // Project deployment base // By default we assume your app will be deployed at the root of a domain, // e.g. https://www.my-app.com/ // If your app is deployed at a sub-path, you will need to specify that // sub-path here. For example, if your app is deployed at // https://www.foobar.com/my-app/ // then change this to ‘/my-app/’ lintOnSave: false, publicPath: BASE_URL, productionSourceMap: false,

最新回复(0)