Commit 5a186500 by 林家欣

修改打包命令配置

parent 9d2df392
NODE_ENV = "production"
VUE_APP_CURRENTMODE = "production" VUE_APP_CURRENTMODE = "production"
VUE_APP_HOST_URL = "http://192.168.0.77:9091" VUE_APP_HOST_URL = "http://192.168.0.77:9091"
VUE_APP_API_URL = "http://192.168.0.77:9091" VUE_APP_API_URL = "http://192.168.0.77:9091"
......
VUE_APP_CURRENTMODE = "production" NODE_ENV = "production"
VUE_APP_CURRENTMODE = "test"
VUE_APP_HOST_URL = "http://81.68.189.225:9091" VUE_APP_HOST_URL = "http://81.68.189.225:9091"
VUE_APP_API_URL = "http://81.68.189.225:9091" VUE_APP_API_URL = "http://81.68.189.225:9091"
VUE_APP_GDS_URL = "http://data-studio.gds.org.cn" VUE_APP_GDS_URL = "http://data-studio.gds.org.cn"
......
...@@ -8,8 +8,8 @@ module.exports = { ...@@ -8,8 +8,8 @@ module.exports = {
'eslint:recommended' 'eslint:recommended'
], ],
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-console': process.env.NODE_ENV !== 'development' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 'no-debugger': process.env.NODE_ENV !== 'development' ? 'error' : 'off'
}, },
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint'
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
}, },
data() { data() {
return { return {
path:process.env.VUE_APP_HOST_URL, path:process.env.VUE_APP_HOST_URL,
animate:false, animate:false,
marginTop:0, marginTop:0,
hotList:[], hotList:[],
......
...@@ -6,7 +6,7 @@ const resolve = dir => { ...@@ -6,7 +6,7 @@ const resolve = dir => {
return path.join(__dirname, dir) return path.join(__dirname, dir)
} }
const BASE_URL = process.env.NODE_ENV === "production" const BASE_URL = process.env.NODE_ENV !== "development"
? "/" ? "/"
: "/" : "/"
...@@ -16,7 +16,7 @@ module.exports = { ...@@ -16,7 +16,7 @@ module.exports = {
indexPath: "index.html", //生成的html路径 indexPath: "index.html", //生成的html路径
filenameHashing: true, //生成文件名中包含hash filenameHashing: true, //生成文件名中包含hash
productionSourceMap: false, productionSourceMap: false,
lintOnSave: process.env.NODE_ENV === "production", // 是否保存时limt代码 lintOnSave: process.env.NODE_ENV !== "development", // 是否保存时limt代码
runtimeCompiler: true, //是否使用编译器 runtimeCompiler: true, //是否使用编译器
chainWebpack: config => { chainWebpack: config => {
config.resolve.alias config.resolve.alias
...@@ -25,7 +25,7 @@ module.exports = { ...@@ -25,7 +25,7 @@ module.exports = {
}, },
css: { css: {
modules: false, //启动css Modules modules: false, //启动css Modules
extract: process.env.NODE_ENV === "production", //css分离插件 extract: process.env.NODE_ENV !== "development", //css分离插件
loaderOptions: { loaderOptions: {
css: { css: {
localIdentName: "[path]-[name]-[local]-[hash:base64:5]", 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