Created
September 23, 2018 07:01
-
-
Save sunnyone/f2b103d5647fb349dda0f477bb397015 to your computer and use it in GitHub Desktop.
webpack-dev-server proxy example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devServer: { | |
contentBase: 'dist', | |
host: '0.0.0.0', | |
port: 3000, | |
proxy: { | |
'/myapp/api': { | |
target: 'http://api-server:8080' | |
}, | |
'/myapp': { | |
target: 'http://localhost:3000/examples/index.html', | |
pathRewrite: {'^.*' : ''} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment