forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.static-viz.config.js
58 lines (52 loc) · 1.15 KB
/
webpack.static-viz.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
46
47
48
49
50
51
52
53
54
55
56
57
58
const SRC_PATH = __dirname + "/frontend/src/metabase";
const BUILD_PATH = __dirname + "/resources/frontend_client";
const BABEL_CONFIG = {
cacheDirectory: process.env.BABEL_DISABLE_CACHE ? null : ".babel_cache",
};
module.exports = {
mode: "production",
context: SRC_PATH,
performance: {
hints: false,
},
entry: {
"lib-static-viz": {
import: "./static-viz/index.js",
library: {
name: "StaticViz",
type: "var",
},
},
},
output: {
path: BUILD_PATH + "/app/dist",
filename: "[name].bundle.js",
},
module: {
rules: [
{
test: /\.(tsx?|jsx?)$/,
exclude: /node_modules/,
use: [{ loader: "babel-loader", options: BABEL_CONFIG }],
},
{
test: /\.(tsx?|jsx?)$/,
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
options: {
rulePaths: [__dirname + "/frontend/lint/eslint-rules"],
},
},
],
},
],
},
resolve: {
extensions: [".webpack.js", ".web.js", ".js", ".jsx", ".ts", ".tsx"],
alias: {
metabase: SRC_PATH,
},
},
};