Vue-cli3.0 or above is configured on the vue.config.js file
chainWebpack(config) {
config.externals({
'./cptable': 'var cptable' })
}
// 或者另外一种写法
configureWebpack: {
externals: {
'./cptable': 'var cptable'
},
}
Lower versions can modify the configuration on the webpack.base.conf.js file
externals: [{
'./cptable': 'var cptable'
}]