-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.component.js
49 lines (47 loc) · 1.01 KB
/
webpack.component.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
// your module webpack config
const path = require('path');
const autoprefixer = require('autoprefixer');
module.exports = {
resolve: {
modulesDirectories: ['node_modules', path.join(__dirname, '../node_modules')],
extensions: ['', '.js', '.jsx', '.json'],
},
module: {
preLoaders: [{
test: /\.jsx?$/,
loader: "eslint-loader",
exclude: /node_modules/
}],
loaders: [{
test: /\.jsx?$/,
loader: "babel",
}, {
test: /\.md$/,
loader: 'raw'
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.css$/,
loader: 'style!css'
}, {
test: /.less$/,
loader: 'style!css!postcss!less'
}],
},
postcss: [
autoprefixer({
browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 8', 'iOS >= 8', 'Android >= 4'],
}),
],
externals: {
'react': 'React',
'React': 'React',
'ReactDOM': 'ReactDOM',
'react-dom': 'ReactDOM',
'antd': 'antd',
},
output: {
libraryTarget: 'umd',
},
};