-
Notifications
You must be signed in to change notification settings - Fork 6
/
webpack.config.js
37 lines (35 loc) · 1.04 KB
/
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
const path = require("path");
const PnpWebpackPlugin = require(`pnp-webpack-plugin`);
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const IGNORED = ["canvas"];
const LEAVE_REQUIRE_AS_IS = IGNORED.reduce((acc, p) => (acc[p] = `commonjs ${p}`, acc), {});
module.exports = {
entry: {
vg2vl1: "./packages/vg2vl1/index.js",
vg3vl1: "./packages/vg3vl1/index.js",
vg4vl2: "./packages/vg4vl2/index.js",
vg5vl3: "./packages/vg5vl3/index.js",
vg5vl4: "./packages/vg5vl4/index.js",
vg5vl5: "./packages/vg5vl5/index.js",
},
mode: "none",
output: {
path: path.resolve(__dirname, "packages/any-vega"),
filename: "[name].js",
libraryTarget: 'umd',
},
externals: LEAVE_REQUIRE_AS_IS,
plugins: [
//new BundleAnalyzerPlugin(),
],
resolve: {
plugins: [
PnpWebpackPlugin,
],
},
resolveLoader: {
plugins: [
PnpWebpackPlugin.moduleLoader(module),
],
},
};