blob: 8143883069739be721accca4de65cb6357162997 [file] [log] [blame]
Monty Taylor4a781a72017-07-25 07:28:04 -04001const path = require('path');
2const webpack = require('webpack');
3const Merge = require('webpack-merge');
4const CommonConfig = require('./webpack.common.js');
5
6module.exports = Merge(CommonConfig, {
7
8 // Enable Hot Module Replacement for devServer
9 devServer: {
10 hot: true,
11 contentBase: path.resolve(__dirname, './zuul/web/static'),
12 publicPath: '/'
13 },
14 module: {
15 rules: [
16 {
17 enforce: 'pre',
18 test: /\.js$/,
19 use: [
20 'babel-loader',
21 'eslint-loader'
22 ],
23 exclude: /node_modules/,
24 }
25 ]
26 },
27 plugins: [
28 new webpack.HotModuleReplacementPlugin(),
29 // We only need to bundle the demo files when we're running locally
30 new webpack.ProvidePlugin({
31 DemoStatusBasic: './status-basic.json',
32 DemoStatusOpenStack: './status-openstack.json',
33 DemoStatusTree: './status-tree.json'
34 }),
35 ]
36})