Use webpack dev proxy to serve api/media
This commit is contained in:
parent
2f8a026afa
commit
50af04345b
4 changed files with 17 additions and 9 deletions
|
|
@ -28,7 +28,20 @@ module.exports = {
|
|||
autoOpenBrowser: true,
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {},
|
||||
proxyTable: {
|
||||
'/api': {
|
||||
target: 'http://nginx:6001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/media': {
|
||||
target: 'http://nginx:6001',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/staticfiles': {
|
||||
target: 'http://nginx:6001',
|
||||
changeOrigin: true,
|
||||
}
|
||||
},
|
||||
// CSS Sourcemaps off by default because relative paths are "buggy"
|
||||
// with this option, according to the CSS-Loader README
|
||||
// (https://github.com/webpack/css-loader#sourcemaps)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue