-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack.config.js
More file actions
87 lines (80 loc) · 2.11 KB
/
Copy pathwebpack.config.js
File metadata and controls
87 lines (80 loc) · 2.11 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const path = require('path');
const webpack = require('webpack');
// var JsDocPlugin = require('jsdoc-webpack-plugin-v2');
module.exports = {
entry: './src/index.js',
output: {
filename: 'index.js',
library: 'fluro',
libraryTarget: 'umd',
libraryExport: 'default',
path: path.resolve(__dirname, 'dist'),
globalObject: 'typeof self !== \'undefined\' ? self : this',
},
// module.exports = () => {
// return {
// output: {
// path: path.resolve(__dirname, 'build'),
// filename: 'app.js',
// },
// entry: './src/index.js',
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
],
// };
// };
// plugins: [
// new JsDocPlugin(
// // {
// // conf:path.join(__dirname, 'jsdoc.json'),
// // }
// )
// ],
optimization: {
// splitChunks: {
// chunks: 'all'
// }
},
externals: {
'mongoose': {
commonjs: 'mongoose',
commonjs2: 'mongoose',
amd: 'mongoose',
root: 'mongoose'
},
'lodash': {
commonjs: 'lodash',
commonjs2: 'lodash',
amd: 'lodash',
root: '_'
},
'moment-timezone': {
commonjs: 'moment-timezone',
commonjs2: 'moment-timezone',
amd: 'moment-timezone',
root: 'moment-timezone'
},
'moment': {
commonjs: 'moment',
commonjs2: 'moment',
amd: 'moment',
root: 'moment'
},
'axios': {
commonjs: 'axios',
commonjs2: 'axios',
amd: 'axios',
root: 'axios'
},
'axios-extensions': {
commonjs: 'axios-extensions',
commonjs2: 'axios-extensions',
amd: 'axios-extensions',
root: 'axios-extensions'
}
},
// output: {
// filename: 'main.js',
// path: path.resolve(__dirname, 'dist')
// }
};