const path = require("path"); module.exports = { configureWebpack: { resolve: { alias: { "@": path.resolve(__dirname, "./"), "@components": path.resolve(__dirname, "./components"), "@pages": path.resolve(__dirname, "./pages"), "@static": path.resolve(__dirname, "./static"), "@utils": path.resolve(__dirname, "./utils"), "@api": path.resolve(__dirname, "./api"), "@store": path.resolve(__dirname, "./store"), "@styles": path.resolve(__dirname, "./styles"), }, }, }, // 开发服务器配置 devServer: { port: 8080, open: true, proxy: { // 如果需要代理配置,可以在这里添加 }, }, // 生产环境配置 productionSourceMap: false, // 输出目录配置 outputDir: "dist", // 静态资源目录 assetsDir: "static", // CSS 配置 css: { loaderOptions: { scss: { additionalData: `@import "@/uni.scss";`, }, }, }, };