From 97f6fa712503df43e1f18eaf4936d80922a4eaae Mon Sep 17 00:00:00 2001 From: tk Date: Tue, 18 Jun 2024 17:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afeat=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E6=94=B9=E7=94=A8=E8=87=AA=E5=AE=9A=E4=B9=89=E7=9A=84?= =?UTF-8?q?=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20=E3=80=90=E6=8F=8F=09?= =?UTF-8?q?=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F=E5=9B=A0]=EF=BC=9AE?= =?UTF-8?q?asycom=20=E9=9C=80=E8=A6=81=E5=9C=A8=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=87=8C=E9=9D=A2=20=E5=81=9A=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=9A=84=E8=AE=BE=E7=BD=AE=20=09[=E8=BF=87=E7=A8=8B]?= =?UTF-8?q?=EF=BC=9A=20=09[=E5=BD=B1=E5=93=8D]=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- vue.config.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 vue.config.js diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..02f93a3 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,37 @@ +module.exports = { + // 开发服务器配置 + devServer: { + //open: true,//run时浏览器打开 + port: 8080, + proxy: { + '/api': { + target: 'http://localhost:3000', + changeOrigin: true, + pathRewrite: { + '^/api': '' + } + } + } + }, + + // 构建时的配置 + outputDir: 'dist', // 输出目录 + assetsDir: 'static', // 静态资源目录 + publicPath: '/', // 部署应用包时的基本 URL + + // 生产环境是否生成 sourceMap 文件 + productionSourceMap: true, + + // CSS 相关选项 + css: { + sourceMap: true, + loaderOptions: { + css: { + // options here will be passed to css-loader + }, + sass: { + // options here will be passed to sass-loader + } + } + } +} \ No newline at end of file