-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
49 lines (47 loc) · 1.02 KB
/
webpack.config.babel.js
File metadata and controls
49 lines (47 loc) · 1.02 KB
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
import { HotModuleReplacementPlugin, NoErrorsPlugin } from 'webpack';
import { resolve } from 'path';
const BUILD_DIR = resolve (__dirname, 'dist');
const APP_DIR = resolve (__dirname, 'src');
export default {
entry: [
'webpack/hot/dev-server',
resolve (APP_DIR, 'index.html'),
resolve (APP_DIR, 'index.jsx')
],
output: {
path: BUILD_DIR,
filename: 'bundle.js'
},
resolve: {
root: APP_DIR,
extensions: ['', '.js', '.jsx']
},
plugins: [
new HotModuleReplacementPlugin (),
// new NoErrorsPlugin ()
],
module : {
loaders : [
{
test : /\.jsx?/,
loader : 'babel'
},
{
test: /\.html$/,
loader: "file?name=[name].[ext]"
},
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.less$/,
loader: 'style!css!less'
},
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpe?g|gif)(\?\S*)?$/,
loader: 'url-loader?limit=300000&name=[name]-[hash].[ext]&root=.'
}
]
}
};