keycloak-scim/snowpack.config.mjs

56 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-07-16 08:59:46 +00:00
import proxy from "http2-proxy";
import path from "node:path";
const themeName = process.env.THEME_NAME ?? "keycloak";
const themePath = path.join("themes", themeName);
/** @type {import("snowpack").SnowpackUserConfig } */
export default {
mount: {
[themePath]: { url: "/", static: true },
public: { url: "/", static: true },
src: { url: "/" },
"node_modules/@patternfly/patternfly/assets/fonts": {
url: "/assets/fonts",
static: true,
},
"node_modules/@patternfly/patternfly/assets/pficon": {
url: "/assets/pficon",
static: true,
},
"node_modules/@patternfly/patternfly/assets/images": {
url: "/assets/images",
static: true,
},
},
plugins: [
"@snowpack/plugin-postcss",
[
"@snowpack/plugin-webpack",
{
outputPattern: {
css: "[name].[contenthash].css",
},
extendConfig: {
output: { publicPath: "auto", path: path.resolve(".", "build") },
},
},
],
2021-07-16 08:59:46 +00:00
"@snowpack/plugin-react-refresh",
"@snowpack/plugin-typescript",
],
routes: [
{
src: "/admin/.*",
2021-07-16 08:59:46 +00:00
dest: (req, res) =>
proxy.web(req, res, {
hostname: "localhost",
port: 8180,
}),
},
],
devOptions: {
hmrErrorOverlay: false,
},
};