forked from geoid-org/loop.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.ts
57 lines (42 loc) · 1.14 KB
/
webpack.prod.ts
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
57
// import path from 'path'
// import { fileURLToPath } from 'url';
// import webpack from 'webpack';
import paths from './webpack.paths';
import path from 'path'
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// const __filename = fileURLToPath(import.meta.url);
// const __dirname = path.dirname(__filename);
const configProduction: any = {
mode: 'production',
devtool: 'source-map',
entry: {
'block.gl': [paths.entryPoint],
'block.gl.min': [paths.entryPoint]
},
resolve: {
extensions: [
'.ts', '.tsx',
'.js', '.jsx',
],
},
output: {
library: 'block.gl',
libraryTarget: 'umd',
libraryExport: 'default',
// path: path.resolve(__dirname, "./lib/"),
path: paths.lib,
// path: "/lib",
filename: '[name].js',
umdNamedDefine: true
},
stats: {
errorDetails: true,
children: true
}
// plugins: [
// new webpack.HotModuleReplacementPlugin()
// ]
};
export default configProduction