Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 29 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | var path = require('path'); |
||
2 | var webpack = require('webpack'); |
||
3 | var HtmlWebpackPlugin = require('html-webpack-plugin'); |
||
4 | var helpers = require('./helpers'); |
||
5 | |||
6 | var environment = helpers.parseDotenvConfig( |
||
7 | require('dotenv').config(path.resolve(__dirname, '../.env')) |
||
8 | ); |
||
9 | |||
10 | module.exports = Object.assign({}, { |
||
11 | plugins: [ |
||
12 | new webpack.DefinePlugin(Object.assign({}, { |
||
13 | 'process.env.NODE_ENV': '"production"' |
||
14 | }, environment)), |
||
15 | new webpack.ProvidePlugin({ |
||
16 | 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' |
||
17 | }), |
||
18 | new HtmlWebpackPlugin({ |
||
19 | inject: 'body', |
||
20 | template: 'src/main.html' |
||
21 | }), |
||
22 | new webpack.optimize.OccurenceOrderPlugin(), |
||
23 | new webpack.optimize.UglifyJsPlugin({ |
||
24 | compressor: { |
||
25 | warnings: false |
||
26 | } |
||
27 | }) |
||
28 | ] |
||
29 | }, require('./config')); |
||
30 |