You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bsdgy-front/vue.config.js

37 lines
1.5 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

module.exports = {
/* 部署生产环境和开发环境下的URL可对当前环境进行区分baseUrl 从 Vue CLI 3.3 起已弃用要使用publicPath */
/* baseUrl: process.env.NODE_ENV === 'production' ? './' : '/' */
/* 用于默认#模式 */
// publicPath: process.env.NODE_ENV === 'production' ? '/public/' : './',
/* history模式 */
publicPath: process.env.NODE_ENV === "production" ? "/dist/" : "/",
/* 输出文件目录在npm run build时生成文件的目录名称 */
outputDir: "dist",
/* 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录 */
assetsDir: "assets",
/* 是否在构建生产包时生成 sourceMap 文件false将提高构建速度 */
productionSourceMap: false,
/* 默认情况下,生成的静态资源在它们的文件名中包含了 hash 以便更好的控制缓存,你可以通过将这个选项设为 false 来关闭文件名哈希。(false的时候就是让原来的文件名不改变) */
filenameHashing: false,
/* 代码保存时进行eslint检测 */
lintOnSave: true,
/* webpack-dev-server 相关配置 */
devServer: {
/* 自动打开浏览器 */
open: true,
/* 设置为0.0.0.0则所有的地址均能访问 */
host: "0.0.0.0",
port: 8311,
https: false,
hotOnly: false,
disableHostCheck: true,
/* 使用代理 后台接口路径 */
// proxy: 'http://192.168.1.123:8312/'
// proxy: 'http://192.168.31.177:8312/'
proxy: "http://localhost:8080/",
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
},
};