-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathwebpack.config.js
More file actions
executable file
·46 lines (45 loc) · 1.07 KB
/
webpack.config.js
File metadata and controls
executable file
·46 lines (45 loc) · 1.07 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
var path = require('path');
var webpack = require('webpack');
module.exports = {
debug: false,
entry: './src/index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'react-atellier.js',
library: 'ReactAtellier',
libraryTarget: 'umd',
},
externals: {
// Use external version of React
'react': 'react',
'react-dom': 'react-dom'
},
module: {
loaders: [
{
test: /\.less$/,
loader: 'style!css!less?outputStyle=expanded&' +
'includePaths[]=' + (path.resolve(__dirname, './bower_components')) + '&' +
'includePaths[]=' + (path.resolve(__dirname, './node_modules'))
},
{
test: /\.less$/,
loader: 'autoprefixer'
},
{
test: /\.(otf|ttf)$/,
loader: 'url?limit=100000'
},
{
test: /\.(png|jpg)$/,
loader: 'url?limit=45000'
},
{
test: /(\.js)$/,
exclude: [path.resolve(__dirname, 'node_modules')],
loader: 'babel',
include: path.join(__dirname, 'src')
},
],
}
};