-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.ts
More file actions
26 lines (23 loc) · 818 Bytes
/
webpack.config.ts
File metadata and controls
26 lines (23 loc) · 818 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
import webpack from 'webpack';
import path from 'path';
const nodeEnv = process.env.NODE_ENV || 'development';
const isProd = nodeEnv === 'production';
const webpackconfiguration: webpack.Configuration = {
entry: path.resolve(__dirname, 'src', 'index.ts'),
devtool: isProd ? 'hidden-source-map' : 'source-map',
output: {
filename: 'typescript-generic-datastructures.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'umd',
globalObject: 'this',
sourceMapFilename: 'typescript-generic-datastructures.map',
library: 'typescript-generic-datastructures'
},
resolve: {
extensions: ['.ts', '.js', '.json']
},
module: {
rules: [{ test: /\.(ts|js)x?$/, use: ['babel-loader', 'source-map-loader'], exclude: /node_modules/ }]
}
};
export default webpackconfiguration;