-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.js
40 lines (36 loc) · 1.1 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
const path = require('path');
/* NOTES:
- When building for production I get "ModuleConcatenation bailout" messages because I'm not writing ES6 javascript, so at some point it may be worthwhile converting the code to ES6 in order to improve optimisation.
- The 'bail' true and 'optimizationBailout' true settings don't alter the output, whereas I thought the first ModuleConcatenation bailout should halt webpack, and I should get more info on what caused the bailout.
*/
module.exports = {
entry: './src/index-web.js',
bail: true,
stats: {
// Examine all modules
maxModules: Infinity,
// Display bailout reasons
optimizationBailout: true
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/
}
],
},
externals: {
'node-fetch': 'fetch',
'solid-auth-cli': 'null',
'fs': 'null-fs'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'safenetworkjs.js',
library: 'Safenetworkjs',
libraryTarget: 'umd'
},
devtool: '#source-map', // #eval-source-map doesn't emit a map!?
target: 'web', // default!
};