We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我们知道如果使用典型webpack生成项目,那么会有三个文件在config文件夹下:
. ├── dev.env.js ├── index.js └── prod.env.js
我们可以在不同的环境去配置不同的文件: dev.env.js:
dev.env.js
'use strict' const merge = require('webpack-merge') const prodEnv = require('./prod.env') module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"http://localhost:8000/"' })
prod.env.js:
prod.env.js
'use strict' const MODEL = require('../static/config.js') const pro= { NODE_ENV: '"production"', BASE_API: 'http://103.200.32.76/' } module.exports =Object.assign({}, pro, MODEL)
但是如果iview-cli生成的文件是这样的:
iview-cli
. ├── config.js └── env.js
env.js:
env.js
export default "development";
config.js:
config.js
import Env from './env'; let config = { env: Env }; export default config;
请问怎么配置呢?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我们知道如果使用典型webpack生成项目,那么会有三个文件在config文件夹下:
我们可以在不同的环境去配置不同的文件:
dev.env.js
:prod.env.js
:但是如果
iview-cli
生成的文件是这样的:env.js
:config.js
:请问怎么配置呢?
The text was updated successfully, but these errors were encountered: