const { defineConfig } = require('@vue/cli-service')
const path = require("path");
const webpack = require('webpack');
const proxy = require('http-proxy-middleware');
function resolve(dir) {return path.join(__dirname, dir);
}
module.exports = { //4.22 模拟mock数据和商铺数据显示第1步:在根目录下的vue.config.js里面设置api.chainWebpack: config => {config.plugin('provide').use(webpack.ProvidePlugin, [{'window.Quill': 'quill'}]);config.resolve.alias.set("public", resolve("public")).set("@", resolve("src")).set("assets", resolve("src/assets")).set("components", resolve("src/components")).set("views", resolve("src/views")).set("css", resolve("src/assets/css")).set("js", resolve("src/assets/js")).set("images",resolve("src/assets/images"))}
}
module.exports = defineConfig({transpileDependencies: true,lintOnSave:false, //检查命名规范
})
还有还有
↓App.vue基础 配置文件
<template><div id="app"><keep-alive exclude="searchResult"><router-view :key="$route.fullPath"></router-view></keep-alive></div>
</template><script>
export default {name: 'App',components: {}
}
</script>
<style>
</style>