-
Ariya Hidayat authored
We have a repo-wide CI run to check ESLint error anyway. Meanwhile, for day-to-day development of static viz frontend, the main webpack config is already equipped with ESLint check (along with hot reload etc).
Ariya Hidayat authoredWe have a repo-wide CI run to check ESLint error anyway. Meanwhile, for day-to-day development of static viz frontend, the main webpack config is already equipped with ESLint check (along with hot reload etc).
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
webpack.static-viz.config.js 898 B
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 }],
},
],
},
resolve: {
extensions: [".webpack.js", ".web.js", ".js", ".jsx", ".ts", ".tsx"],
alias: {
metabase: SRC_PATH,
},
},
};