webpack.config.js
1.37 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
const path = require('path');
const jsdoc = require('jsdoc-webpack-plugin');
const copy = require('copy-webpack-plugin');
const eslint = require('eslint-webpack-plugin');
module.exports = {
experiments : {
outputModule: true
},
entry: {
'arcs' : {
import : './src/exports.js',
},
},
mode: 'none',
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'build'),
library: {
type: 'module',
}
},
module: {
parser: {
javascript: {
commonjsMagicComments: true
}
}
},
plugins: [
new jsdoc({
conf: 'docs/engine.conf.json',
destination: 'docs/engine',
template: 'docs/arcs',
}),
new jsdoc({
conf: 'docs/components.conf.json',
destination: 'docs/components',
template: 'docs/arcs',
}),
new copy({
patterns: [
{ from : 'src/arcs_browser.js', to: 'arcs_browser.js'},
{ from: 'src/arcs_node.mjs', to: 'arcs_node.mjs'}
// TODO put here also files for dep directory.
// can also prepend content and replace strings using the transform property!
]
}),
new eslint({})
]
};