const { VantResolver } = require("unplugin-vue-components/resolvers"); const ComponentsPlugin = require("unplugin-vue-components/webpack"); module.exports = { //配置路径别名 devServer: { port: 3000, open: true, hot: true,//自动保存 }, lintOnSave: false, productionSourceMap: false, publicPath: "./", transpileDependencies: [], configureWebpack: { plugins: [ ComponentsPlugin({ resolvers: [VantResolver()], }), ], }, }