Skip to content

Modes and Proxy configuration #1008

New issue

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

Closed
tianlizhao opened this issue Mar 19, 2018 · 2 comments
Closed

Modes and Proxy configuration #1008

tianlizhao opened this issue Mar 19, 2018 · 2 comments

Comments

@tianlizhao
Copy link

What problem does this feature solve?

目前mode加载对应的.env文件是下面这样的

1. run script
2. loadEnv( load base .env )
3. loadUserOptions( vue.config.js )
4. Starting server
5. setMode( --mode mock load .env.mock)
6. ...

所以就会有个问题,在加载vue.config.js文件里除了configureWebpack, chainWebpack这两个地方写方法可以获取mode和对应加载的env就没办法了,做一些 mockdevelopment 区别就变的不容易

proxy配置

只能在vue.config.devServer这里配置是生效的,在configureWebpack, chainWebpack这两个地方改都没有merge进去

What does the proposed API look like?

  1. mode设置提前

    1. run script
    2. loadEnv( load base .env )
    3. setMode( --mode mock load .env.mock)
    4. loadUserOptions( vue.config.js )
    5. Starting server
    6. ...
    
  2. 是不是可以考虑也可以在configureWebpack, chainWebpack设置所有配置

@ghost
Copy link

ghost commented Apr 19, 2018

English please.

@yyx990803
Copy link
Member

Closing to be tracked in #959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants