-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack-base-config.js
45 lines (44 loc) · 1.09 KB
/
webpack-base-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
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: {
'app': './src/index.js',
'chart': './src/plugin.js',
},
devtool: 'source-map',
output: {
path: __dirname + '/build',
filename: '[name].js',
},
module: {
loaders: [
{
test: /\.js$/,
include: [
path.resolve(__dirname, 'src/'),
/@dhis2\/d2-ui-rich-text/,
],
loader: 'babel',
query: {
cacheDirectory: true,
presets: ['es2015', 'stage-2'],
},
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: [
'url-loader?limit=8192'
]
},
{
test: /\.json$/,
loader: 'json-loader',
},
],
}
};