Add compliance-portal bundle entrypoint on v2 theme
The compliance-portal scaffold had an index.html pointing at a src/main.tsx that did not exist, and carried stale config copied from another app, so the bundle could not build. Add the React entrypoint (main.tsx, App.tsx), a Tailwind index.css wired to the standalone v2 theme, and vite-env.d.ts for the CSS side-effect import and env typing. Scope the Tailwind @source scan to packages/ui/src/v2 since this is a v2-only build, and use v2 color and type scales in index.html and App. Drop the deprecated baseUrl from tsconfig.app.json and remove the invalid react() babel relay option, which is unsupported by @vitejs/plugin-react 6 and unneeded until Relay queries exist. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
|
||||
<body class="text-txt-primary bg-level-0">
|
||||
<body class="text-sand-12 bg-sand-1">
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
|
||||
21
apps/compliance-portal/src/App.tsx
Normal file
21
apps/compliance-portal/src/App.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2025-2026 Probo Inc <hello@probo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<main className="flex min-h-screen items-center justify-center bg-sand-1">
|
||||
<h1 className="text-6 font-bold text-sand-12">Compliance Portal</h1>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
3
apps/compliance-portal/src/index.css
Normal file
3
apps/compliance-portal/src/index.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@import "tailwindcss";
|
||||
@import "@probo/ui/src/v2/theme.css";
|
||||
@source "../../../packages/ui/src/v2";
|
||||
21
apps/compliance-portal/src/main.tsx
Normal file
21
apps/compliance-portal/src/main.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2025-2026 Probo Inc <hello@probo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import "./index.css";
|
||||
|
||||
import { App } from "./App";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(<App />);
|
||||
23
apps/compliance-portal/src/vite-env.d.ts
vendored
Normal file
23
apps/compliance-portal/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2025-2026 Probo Inc <hello@probo.com>.
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
@@ -14,9 +14,8 @@
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"#/*": ["src/*"]
|
||||
"#/*": ["./src/*"]
|
||||
},
|
||||
|
||||
/* Linting */
|
||||
|
||||
@@ -20,7 +20,7 @@ import { defineConfig } from "vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react({ babel: { plugins: ["relay"] } }), tailwindcss()],
|
||||
plugins: [react(), tailwindcss()],
|
||||
build: {
|
||||
assetsDir: "assets",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user