forked from mhsattarian/mapbox-gl-draw-snap-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.development.js
43 lines (41 loc) · 903 Bytes
/
webpack.development.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
39
40
41
42
43
/**
* note:
* Webpack dev Server had a problem with `umd` builds,
* so v4 beta is used to fix that.
*
* it also possible to use the `3.11.0` version as well with `hot` and `injectClient` set to `false`.
*/
const path = require("path");
module.exports = [
{
mode: "development",
devServer: {
static: path.join(__dirname, "docs"),
compress: true,
port: 9000,
hot: true,
},
entry: "./src/index.js",
devtool: "source-map",
output: {
filename: "index.js",
library: "mapboxGlDrawSnapMode",
libraryTarget: "umd",
globalObject: "this",
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
},
],
},
},
];