-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
29 lines (27 loc) · 894 Bytes
/
webpack.config.js
File metadata and controls
29 lines (27 loc) · 894 Bytes
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
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
entry: './src/index.ts', // Your main TypeScript entry file
mode: 'production', // Set mode to production for minification
devtool: 'source-map',
module: {
rules: [{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}]
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
plugins: [new TsconfigPathsPlugin({ configFile: "./tsconfig.json" })],
},
output: {
filename: 'phylojs.min.js',
path: path.resolve(__dirname, './lib/dist/'),
library: 'phylojs', // Name you want for the global variable when included in a browser
libraryTarget: 'umd', // Universal module definition
},
optimization: {
minimize: true,
}
};