forked from mannynotfound/react-tweet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (40 loc) · 924 Bytes
/
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
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
process.env.UV_THREADPOOL_SIZE = 100;
module.exports = {
context: path.join(__dirname),
entry: {
app: ['webpack/hot/dev-server', './example/app.js']
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/assets/'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loaders: ['babel?optional[]=runtime&cacheDirectory']
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'css!sass')
},
{
test: /\.json$/,
loader: "json-loader"
}
]
},
resolve: {
modulesDirectories: ['node_modules', 'src/components'],
alias: {
react: path.resolve('./node_modules/react')
}
},
plugins: [
new ExtractTextPlugin('[name].css')
]
};