-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwebpack.config.js
38 lines (35 loc) · 1.02 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
var webpack = require('webpack');
module.exports = {
context : __dirname,
entry : [
'webpack/hot/dev-server',
'./app/components/Application'
],
output : {
path: __dirname,
filename: 'bundle.js'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
{test: /\.jsx$/, loaders: ['react-hot', 'jsx-loader?harmony&insertPragma=React.DOM']},
{test: /\.es6\.js$/, loader: 'es6-loader'},
// compile and include less files
{test: /\.less$/, loader: 'style-loader!css-loader!autoprefixer-loader!less-loader'},
// allow less files to load urls pointing to font assets
// @TODO: figure out why this is necessary and do it better
{test: /\.(woff|ttf|eot|svg)$/, loader: 'file-loader' }
]
},
resolve : {
extensions: ['', '.js', '.es6.js', '.jsx'],
alias : {
actions : __dirname + '/app/actions',
constants : __dirname + '/app/constants',
stores : __dirname + '/app/stores'
}
}
};