Passed
Push — master ( 50adea...d5902b )
by Amit
02:19
created

assets/build/webpack.config.watch.js   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 34
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 2
dl 0
loc 34
rs 10
c 1
b 0
f 0
wmc 1
mnd 1
bc 1
fnc 0
bpm 0
cpm 0
noi 0
1
const url = require('url');
2
const webpack = require('webpack');
3
const BrowserSyncPlugin = require('browsersync-webpack-plugin');
4
5
const config = require('./config');
6
7
const target = process.env.DEVURL || config.devUrl;
8
9
/**
10
 * We do this to enable injection over SSL.
11
 */
12
if (url.parse(target).protocol === 'https:') {
13
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
14
}
15
16
module.exports = {
17
  output: {
18
    pathinfo: true,
19
    publicPath: config.proxyUrl + config.publicPath,
20
  },
21
  devtool: '#cheap-module-source-map',
22
  stats: false,
23
  plugins: [
24
    new webpack.optimize.OccurrenceOrderPlugin(),
25
    new webpack.HotModuleReplacementPlugin(),
26
    new webpack.NoEmitOnErrorsPlugin(),
27
    new BrowserSyncPlugin({
28
      target,
29
      proxyUrl: config.proxyUrl,
30
      watch: config.watch,
31
      delay: 500,
32
    }),
33
  ],
34
};
35