diff --git a/src/config.js b/src/config.js index b0581c3..920f341 100644 --- a/src/config.js +++ b/src/config.js @@ -1,4 +1,10 @@ -import config from "@/config.json"; +let config; + +if ("production" == process.env.NODE_EN) { + config = require("@/config/production.json"); +} else { + config = require("@/config/test.json"); +} export default { ...config, diff --git a/src/config/production.json b/src/config/production.json new file mode 100644 index 0000000..8523792 --- /dev/null +++ b/src/config/production.json @@ -0,0 +1,4 @@ +{ + "api": "/api/v1", + "url_prefix": "" +} diff --git a/src/config.json b/src/config/test.json similarity index 100% rename from src/config.json rename to src/config/test.json