vue-cli打包出单文件
// vue.config.js修改
const { defineConfig } = require('@vue/cli-service')
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
filenameHashing: false,
css: {
extract: false,
},
configureWebpack: {
optimization: {
splitChunks: false,
},
output: {
filename: 'single.js',
}
}
})