-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (33 loc) · 1.35 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
/**
* @author Jonathan Terrell <jonathan.terrell@springbrook.es>
* @copyright Copyright (c) 2019-2021 Springbrook S.L.
* @license "Apache-2.0"
*/
// Webpack required because rollup does not support dynamic imports with names in variables.
const path = require('path');
// -------------------------------------------------------------------------------------------------------------------------------
// Exports
// -------------------------------------------------------------------------------------------------------------------------------
module.exports = [
{
entry: './src/index.js',
experiments: { outputModule: true },
mode: 'development', // Fails if this is changed to 'production'. It appears to be linked to dynamic import of notebooks.
output: {
// chunkFormat: 'module',
filename: 'index.js',
library: { type: 'module' },
path: path.resolve(__dirname, 'dist/webpack')
}
},
{
entry: './src/index.js',
mode: 'development', // Fails if this is changed to 'production'. It appears to be linked to dynamic import of notebooks.
output: {
// chunkFormat: 'module',
filename: 'index.umd.js',
library: { name: 'Nectis', type: 'umd' },
path: path.resolve(__dirname, 'dist/webpack')
}
}
];