https://blog.csdn.net/weixin_45499352/article/details/114588129
configureWebpack: (config) => { // config.externals = { // nodeExternals: 'nodeExternals' // } config.resolve = { // 配置解析别名 extensions: ['.js', '.json', '.vue'], alias: { '@': path.resolve(__dirname, './src'), assets: path.resolve(__dirname, './src/assets'), components: path.resolve(__dirname, './src/components'), views: path.resolve(__dirname, './src/views') } } config.plugins.push(new webpack.ProvidePlugin({ api: [path.resolve(__dirname, 'src/network/index.js'), 'default'] })) },
globals: {
"api": true,
},