forked from MarquezProject/marquez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
48 lines (46 loc) · 1.32 KB
/
webpack.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const merge = require('webpack-merge')
const webpack = require('webpack')
const webpackShared = require('./webpack.common.js')
const webpackDev = {
mode: 'development',
devServer: {
static: {
directory: __dirname + '/src',
staticOptions: {},
publicPath: "/",
serveIndex: true,
watch: true,
},
port: 1337,
devMiddleware: {
publicPath: '/'
},
historyApiFallback: {
index: './index.html',
disableDotRule: true
},
proxy: {
'/api': {
target: `http://${process.env.MARQUEZ_HOST || 'localhost'}:${process.env.MARQUEZ_PORT || 8080}/`,
secure: false,
logLevel: 'debug',
headers: {
'X-Bifrost-Authentication': 'developer'
}
}
}
},
// Enable sourcemaps for debugging webpack"s output.
devtool: 'eval-cheap-module-source-map',
plugins: [
new webpack.DefinePlugin({
__DEVELOPMENT__: JSON.stringify(true),
__API_URL__: JSON.stringify('/api/v1'),
__NODE_ENV__: JSON.stringify('development'),
__TEMP_ACTOR_STR__: JSON.stringify('me'),
__FEEDBACK_FORM_URL__: JSON.stringify('https://forms.gle/f3tTSrZ8wPj3sHTA7'),
__API_DOCS_URL__: JSON.stringify('https://marquezproject.github.io/marquez/openapi.html')
})
]
}
module.exports = merge.smart(webpackShared, webpackDev)