-
Ariya Hidayat authored
* yarn add @visx/axis@1.8.0 @visx/grid@1.16.0 @visx/group@1.7.0 @visx/scale@1.7.0 @visx/shape@1.8.0 * Import static viz charting code * Format code with yarn prettier * Silence linting violations * Build static-viz bundle
Ariya Hidayat authored* yarn add @visx/axis@1.8.0 @visx/grid@1.16.0 @visx/group@1.7.0 @visx/scale@1.7.0 @visx/shape@1.8.0 * Import static viz charting code * Format code with yarn prettier * Silence linting violations * Build static-viz bundle
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
webpack.static-viz.config.js 1.09 KiB
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,
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: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [{ loader: "babel-loader", options: BABEL_CONFIG }],
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
options: {
rulePaths: [__dirname + "/frontend/lint/eslint-rules"],
},
},
],
},
],
},
resolve: {
extensions: [".webpack.js", ".web.js", ".js", ".jsx"],
alias: {
metabase: SRC_PATH,
},
},
}