-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
61 lines (56 loc) · 1.45 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"use strict";
let path = require("path")
let fs = require("fs")
let pkg = JSON.parse(
fs.readFileSync(path.join(__dirname, "package.json"), "utf-8")
)
let version = pkg.version
let config3d = {
mode: 'development',
entry: [
"./src/threejs/renderers/Projector.js",
"./src/threejs/controls/FlyControls.js",
"./src/threejs/textures/threex.dynamictexture.js",
"./src/HtmCells.js",
"./src/InputCells.js",
"./src/HtmMiniColumns.js",
"./src/BaseGridVisualization.js",
"./src/CompleteHtmVisualization.js",
"./src/SingleLayerVisualization.js",
"./src/SpToInputVisualization.js",
"./src/HighbrowLayerVisualization.js",
"./src/HighbrowColumnVisualization.js",
"./src/HtmViz3d.js"
],
module: {
rules: [
{
test: path.join(__dirname, "src"),
loader: "babel-loader"
}
]
},
output: {
path: __dirname + "/dist",
filename: `cell-viz-3d-${version}.min.js`
}
}
let config2d = {
mode: 'development',
entry: [
"./src/SdrUtils.js",
"./src/SdrDrawing.js",
"./src/HtmViz2d.js"
],
module: {
rules: [
{ test: path.join(__dirname, "src"),
loader: "babel-loader" }
]
},
output: {
path: __dirname + "/docs",
filename: `cell-viz-2d-${version}.min.js`
}
}
module.exports = [config3d, config2d]