Commit af8a740b by 林家欣

修改打包环境配置

parent 804e1a2c
NODE_ENV = "development"
VUE_APP_CURRENTMODE = "development"
VUE_APP_HOST_URL = "http://81.68.189.225:9091"
VUE_APP_API_URL = "/"
......
......@@ -8,10 +8,10 @@ module.exports = {
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV !== 'development' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV !== 'development' ? 'error' : 'off'
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
}
\ No newline at end of file
......@@ -990,7 +990,7 @@ export default {
},
getCustomService() {
let service = localStorage.getItem("gs-custom-service") || "";
console.log("getCustomService-----------", service);
// console.log("getCustomService-----------", service);
if (service) {
service = JSON.parse(service);
this.showCustomService(service);
......@@ -1097,7 +1097,7 @@ export default {
},
// 商品全球身份证
async homeNewGtin() {
console.log(process.env, "process.env");
console.log(process.env.NODE_ENV, "process.env");
this.$http
.get(`${process.env.VUE_APP_GDS_URL}/Data/NewGtin`)
.then((res) => {
......
......@@ -6,7 +6,7 @@ const resolve = dir => {
return path.join(__dirname, dir)
}
const BASE_URL = process.env.NODE_ENV !== "development"
const BASE_URL = process.env.NODE_ENV === "production"
? "/"
: "/"
......@@ -16,7 +16,7 @@ module.exports = {
indexPath: "index.html", //生成的html路径
filenameHashing: true, //生成文件名中包含hash
productionSourceMap: false,
lintOnSave: process.env.NODE_ENV !== "development", // 是否保存时limt代码
lintOnSave: process.env.NODE_ENV === "production", // 是否保存时limt代码
runtimeCompiler: true, //是否使用编译器
chainWebpack: config => {
config.resolve.alias
......@@ -25,7 +25,7 @@ module.exports = {
},
css: {
modules: false, //启动css Modules
extract: process.env.NODE_ENV !== "development", //css分离插件
extract: process.env.NODE_ENV === "production", //css分离插件
loaderOptions: {
css: {
localIdentName: "[path]-[name]-[local]-[hash:base64:5]",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment