forked from elabftw/elabftw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-builder.js
More file actions
56 lines (55 loc) · 1.14 KB
/
Copy pathnode-builder.js
File metadata and controls
56 lines (55 loc) · 1.14 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
52
53
54
55
56
/**
* @author Marcel Bolten
* @copyright 2012 Nicolas CARPi
* @see https://www.elabftw.net Official website
* @license AGPL-3.0
* @package elabftw
*
* Config file for building node apps with webpack
*
*/
const path = require('path');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = (env) => {
return {
target: 'node',
entry: {
tex2svg: [
'./src/node/tex2svg.js',
],
evalmathjs: [
'./src/ts/mathjs.ts',
'./src/node/evalmathjs.js',
],
},
mode: 'production',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'src/node'),
},
resolve: {
extensions: ['.ts', '.js',],
},
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
options: {
transpileOnly: env.production,
},
},
exclude: /node_modules/,
},
],
},
plugins: [
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: './tsconfig.json',
},
}),
],
}
};