forked from haven-protocol-org/haven-web-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.base.js
38 lines (35 loc) · 819 Bytes
/
webpack.base.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
"use strict"
const path = require("path");
let configBase = {
module: {
rules: [
{
test: /\.js$/,
exclude: [path.join(__dirname, 'node_modules'),path.join(__dirname, 'dist')],
type: "javascript/auto",
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: false
}
}
]
}
]
},
devtool: 'source-map',
externals: ['worker_threads','ws','perf_hooks'], // exclude nodejs
resolve: {
alias: {
"fs": "html5-fs"
},
extensions: ['.js', '.jsx', '.css', '.json', 'otf', 'ttf', 'eot', 'svg'],
modules: [
'node_modules'
]
},
cache: true,
context: __dirname
};
module.exports = configBase;