-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
57 lines (49 loc) · 1.33 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
var webpack = require('webpack')
var path = require('path')
var ExtractTextPlugin = require("extract-text-webpack-plugin")
var AUTOPREFIXER_BROWSERS = [
'Android 2.3',
'Android >= 4',
'Chrome >= 20',
'Firefox >= 24',
'Explorer >= 8',
'iOS >= 6',
'Opera >= 12',
'Safari >= 6'
]
module.exports = {
entry: './app/main.js',
output: {
filename: 'COTO.js',
path: './static/'
},
module: {
loaders: [
{ test: /.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?stage=0&optional=runtime&loose=all' },
{ test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css?localIdentName=[local]___[hash:base64:5]&sourceMap!postcss-loader')}
]
},
postcss: function() {
return [
require('autoprefixer')({ browsers: AUTOPREFIXER_BROWSERS }),
require('postcss-nested'),
require('postcss-simple-vars'),
]
},
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
'action': path.join(__dirname, './app/action'),
'api': path.join(__dirname, './app/api'),
'component': path.join(__dirname, './app/component'),
'config': path.join(__dirname, './app/config'),
'container': path.join(__dirname, './app/container'),
'reducer': path.join(__dirname, './app/reducer'),
'selector': path.join(__dirname, './app/selector')
}
},
plugins: [
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin("COTO.css")
]
}