forked from akvelon/viz-packed_bubble-marketplace
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwebpack.config.js
More file actions
executable file
·34 lines (31 loc) · 864 Bytes
/
webpack.config.js
File metadata and controls
executable file
·34 lines (31 loc) · 864 Bytes
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
var path = require("path");
const TerserPlugin = require('terser-webpack-plugin');
var webpackConfig = {
mode: "production",
entry: {
packed_bubble: "./src/bubble_chart/bubble_chart_container.js",
},
devServer: {
contentBase: "./dist",
},
output: {
filename: "packed_bubble.js",
path: path.join(path.resolve(__dirname), "/dist"),
library: "[name]",
libraryTarget: "umd",
},
resolve: {
extensions: [".js"],
modules: [path.join(__dirname, "../src"), "node_modules"],
},
plugins: [new TerserPlugin()],
module: {
rules: [
{ test: /\.(js|jsx)$/, use: [{loader: "babel-loader"}] },
{ test: /\.css$/, use: [{loader: "to-string-loader"}, {loader: "css-loader"}] },
{ test: /\.(woff|woff2|ttf|otf)$/, use: [{loader: "url-loader"}] },
],
},
stats: {},
};
module.exports = webpackConfig;