-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
38 lines (34 loc) · 952 Bytes
/
webpack.config.js
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
//Webpack requires this to work with directories
const path = require('path');
// This is main configuration object that tells Webpackw what to do.
module.exports = {
//path to entry paint
entry: './src/plugin.js',
//path and filename of the final output
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'plugin.js',
library: 'OpenMCTLegacyPlugin',
libraryTarget: 'umd',
},
module: {
rules: [{
test: /\.html$/,
use: 'html-loader'
}, {
test: /zepto/,
use: [
"imports-loader?this=>window",
"exports-loader?Zepto"
]
}]
},
resolve: {
alias: {
"saveAs": "file-saver",
"csv": "comma-separated-values",
"objectUtils": path.join(__dirname, "src/object-utils.js"),
}
},
devtool: "inline-source-map"
}