forked from eJuke/Leaflet.Canvas-Markers
-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
45 lines (40 loc) · 956 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
39
40
41
42
43
44
45
const path = require("path");
const webpack = require("webpack");
const uglifyPlugin = require("uglifyjs-webpack-plugin");
const environment = process.env.NODE_ENV || "prod";
const isProd = environment === "prod";
const vendors = [
"rbush"
];
const plugins = [
new uglifyPlugin({
parallel: true,
cache: false,
sourceMap: !isProd
})
];
const webpackConfig = {
mode: "none",
entry: {
"leaflet.canvas-markers": "./src/_full.js",
"leaflet.canvas-markers.standalone": "./src/_standalone.js",
},
devtool: isProd ? "(none)" : "source-map",
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
},
resolve: {
extensions: [".js"]
},
module: {
rules: [
{
test: /rbush.js/,
use: "script-loader"
}
]
},
plugins: plugins,
};
module.exports = webpackConfig;