goindex-theme-r/vue.config.js

38 lines
820 B
JavaScript
Raw Normal View History

2020-04-28 02:16:41 +08:00
const path = require("path");
2020-04-24 19:43:00 +08:00
2020-04-28 02:16:41 +08:00
function resolve(dir) {
return path.join(__dirname, dir);
2020-04-24 19:43:00 +08:00
}
module.exports = {
2020-04-28 02:16:41 +08:00
lintOnSave: true,
// css: {
// loaderOptions: {
// sass: {
// prependData: `@import '~@/assets/style/public.scss';`,
// },
// }
// },
chainWebpack: (config) => {
config.resolve.alias
.set("@", resolve("src"))
.set("@assets", resolve("src/assets"))
.set("@utils", resolve("src/utils"))
.set("@node_modules", resolve("node_modules"));
config.output
.filename("js/app.mini.js")
.end();
},
devServer: {
proxy: {
"/api": {
target: "https://ossdev.achirou.workers.dev/",
ws: true,
changeOrigin: true,
pathRewrite: {
"^/api": "",
},
},
2020-04-24 19:43:00 +08:00
},
2020-04-28 02:16:41 +08:00
},
};