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