-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.config.js
66 lines (65 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
var path = require('path')
module.exports = {
entry: [path.join(__dirname, 'index')],
devtool: 'inline-source-map', //just do inline source maps instead of the default
output: {
path: path.join(process.cwd(), 'dist'),
filename: 'app.bundle.js',
},
resolve: {
modules: [
__dirname,
path.join(__dirname, 'client'),
path.join(__dirname, 'node_modules/superdesk-core/styles/sass'),
'node_modules'
],
extensions: ['.js', '.jsx', '.json'],
alias: {
images: path.resolve(__dirname, 'node_modules/superdesk-core/images'),
apps: path.resolve(__dirname, 'node_modules/superdesk-core/scripts/apps')
}
},
module: {
rules: [
{
test: /\.html$/,
loader: 'html-loader'
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
},
{
test: /\.json$/,
use: ['json-loader']
},
{
enforce: 'post',
test: /\.jsx?/,
loader: 'istanbul-instrumenter-loader',
exclude: [
/node_modules\//,
/client\/index\.js/,
/_test\.jsx?/,
/tests\.js/,
/client\/controllers\//
]
},
{
test: /\.(png|gif|jpeg|jpg|woff|woff2|eot|ttf|svg)(\?.*$|$)/,
loader: 'file-loader'
}
],
}
}