-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.example.js
More file actions
36 lines (35 loc) · 985 Bytes
/
webpack.config.example.js
File metadata and controls
36 lines (35 loc) · 985 Bytes
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
/**
* Created by Abaddon on 25.04.2015.
*/
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./src/js/app'
],
debug: true,
output: {
path: path.join(__dirname, 'example'),
filename: 'bundle.js'
},
resolveLoader: {
modulesDirectories: ['node_modules']
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.IgnorePlugin(/un~$/)
],
resolve: {
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{test: /\.js$/, exclude: [/node_modules/], loader: 'babel-loader?optional=runtime'},
{test: /\.jsx$/, exclude: [/node_modules/], loaders: ['react-hot', 'babel-loader?optional=runtime']},
{test: /\.css$/, loader: 'style-loader!css-loader'}
]
}
};