-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathwebpack.test.config.js
54 lines (52 loc) · 1.04 KB
/
webpack.test.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
// Electron Main Process configuration
const path = require('path');
const webpack = require('webpack');
const base = path.resolve(__dirname);
const paths = {
base,
src : path.resolve(base, 'test'),
lib : path.resolve(base, 'src'),
libtest : path.resolve(base, 'test', 'lib'),
};
module.exports = {
performance: {
hints: false,
},
target: 'node',
devtool: 'cheap-module-source-map',
context: paths.src,
resolve: {
extensions: ['.js'],
modules: [
paths.src,
paths.lib,
'node_modules'
],
alias: {
'electron': path.resolve(paths.libtest, 'electron.js'),
'react-ionize': path.resolve(paths.lib, 'index.js'),
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['react'],
}
}
},
{
test: /\.json$/,
loader: 'json-loader',
},
],
},
node: {
__dirname: false,
__filename: false,
},
};