-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
57 lines (56 loc) · 1.29 KB
/
webpack.config.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
49
50
51
52
53
54
55
56
57
const path = require('path')
const webpack = require('webpack')
module.exports = {
devtool: 'cheap-module-source-map',
entry: [
"babel-polyfill",
"./src/index.js"
],
output: {
path: path.join(__dirname, '/'),
filename: 'gittoken-account-ui.dist.js',
publicPath: '/'
},
devServer: {
historyApiFallback: true
},
module: {
loaders: [
{
test: /\.(js|jsx)?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
plugins: ['transform-runtime'],
presets: ['env', 'react', 'stage-0', 'es2015']
}
}, {
test : /.json?$/,
loader : "json-loader"
},{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader'
}
},{
// test: /\.(woff2|woff|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
test: /\.(woff2|woff|ttf|eot|svg)(\?.*$|$)/,
loader: 'file-loader?name=fonts/[name].[ext]',
include: [
path.join(__dirname, 'src'),
path.join(__dirname, 'node_modules'),
],
}
]
},
plugins: [
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
// }),
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"development"'
})
]
}