forked from thoughtspile/grafar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
28 lines (27 loc) · 776 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
28 lines (27 loc) · 776 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
var path = require('path');
var isProduction = process.env.NODE_ENV === 'production';
var { version } = require('./package.json');
const { DefinePlugin } = require('webpack');
module.exports = {
mode: isProduction ? 'production' : 'development',
entry: { grafar: './src/grafar.ts' },
output: {
path: path.resolve('build'),
filename: "[name].js",
library: "grafar",
libraryTarget: 'umd',
umdNamedDefine: true
},
resolve: { extensions: ['', '.ts', '.js'] },
module: {
rules: [ { test: /\.ts$/, loader: 'ts-loader' } ]
},
plugins: [
new DefinePlugin({
'process.env.GRAFAR_VERSION': JSON.stringify(version),
}),
],
optimization: {
minimize: false
}
}