-
Notifications
You must be signed in to change notification settings - Fork 16
/
webpack.config.js
46 lines (46 loc) · 1.28 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
module.exports = [{
entry: './index.ts', // Entry point is index.ts
mode: 'development',
optimization: {
minimize: false,
},
name: 'raw',
devtool: 'inline-source-map',
resolve: {
extensions: ['.ts', '.js'], // Add .ts extension to resolve TypeScript files
},
module: {
rules: [
{
test: /\.ts$/, // Include .ts files
use: 'ts-loader', // Use ts-loader for TypeScript compilation
exclude: /node_modules/, // Exclude node_modules directory
},
],
},
output: {
filename: 'kalman-filter.js',
library: 'kalmanFilter',
libraryTarget: 'var',
},
}, {
entry: './index.ts', // Entry point is index.ts
name: 'min',
resolve: {
extensions: ['.ts', '.js'], // Add .ts extension to resolve TypeScript files
},
module: {
rules: [
{
test: /\.ts$/, // Include .ts files
use: 'ts-loader', // Use ts-loader for TypeScript compilation
exclude: /node_modules/, // Exclude node_modules directory
},
],
},
output: {
filename: 'kalman-filter.min.js',
library: 'kalmanFilter',
libraryTarget: 'var',
},
}];