@vue/cli 4.4.6 build后登录页面出现this.方法名 is not a function
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "./bdata/" : "./",
outputDir: 'dists', // 输出文件目录
assetsDir: "./static", //放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
indexPath: './index.html', //指定生成的 index.html 的输出路径 (相对于 outputDir)。也可以是一个绝对路径
lintOnSave: false,
runtimeCompiler: true,
productionSourceMap: false,
transpileDependencies: ["vuetify"],
devServer: {
proxy: {}
host: '0.0.0.0',
port: 8080,
https: false,
open: false,
},
configureWebpack: config => {
if (isProduction) {
plugins: [
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_console: true,
pure_funcs:['console.log']
}
},
parallel: true
}),
new CompressionWebpackPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'),
threshold: 10240,
minRatio: 0.8
})
]
}
else { //开发环境
} },};
登录的方法是写在src/function/auth/login.js:export{login}
本地运行可以,打包部署到云上就出现这个问题,请问还有什么是我要理解改正的。
信息有点少欸,具体的报错截图有的话也附上吧,打包产物本地服务器运行呢?