forked from betagouv/eva
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config-test.js
More file actions
57 lines (52 loc) · 1.22 KB
/
webpack.config-test.js
File metadata and controls
57 lines (52 loc) · 1.22 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
47
48
49
50
51
52
53
54
55
56
57
const path = require('path');
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
var config = {
entry: './all-tests.js',
output: {
path: path.resolve(__dirname, 'tests_build'),
filename: 'testBundle.js'
},
resolve: {
alias: {
accueil: path.resolve(__dirname, 'src/situations/accueil/'),
commun: path.resolve(__dirname, 'src/situations/commun/'),
controle: path.resolve(__dirname, 'src/situations/controle/'),
inventaire: path.resolve(__dirname, 'src/situations/inventaire/')
}
},
target: 'node',
externals: [nodeExternals()],
node: {
fs: 'empty'
},
watchOptions: {
ignored: /node_modules/
},
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
loader: 'null-loader'
},
{
test: /\.(png|jpg|gif|mp3)$/i,
use: [
{
loader: 'url-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets',
limit: 8192
}
}
]
}
]
},
plugins: [
new webpack.ProvidePlugin({ jQuery: 'jquery' }),
new webpack.ProvidePlugin({ expect: ['expect.js'] })
]
};
module.exports = config;