forked from looker-open-source/viz-histogram-marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
43 lines (42 loc) · 935 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
var webpackConfig = {
mode: "production",
entry: {
histogram: "./src/histogram.js",
},
output: {
filename: "[name].js",
path: __dirname,
library: "[name]",
libraryTarget: "umd",
},
module: {
rules: [
{
test: /\.css$/i,
loader: ["style-loader", "css-loader"],
},
{
test: /\.(?:js|mjs|cjs)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', { targets: "defaults" }]
],
plugins: ['@babel/plugin-transform-nullish-coalescing-operator', '@babel/plugin-transform-optional-chaining']
}
}
},
{
test: /\.(woff|woff2|ttf|otf)$/,
loader: "url-loader",
},
],
},
resolve: {
extensions: [".js"],
modules: ["node_modules"],
},
};
module.exports = webpackConfig;