Skip to content
Discussion options

You must be logged in to vote

Hello @hellofrontendxxx ,

You can build the themed components using Vite plugins, for example:

import * as path from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "vite";
import { buildThemedComponents } from "@cloudscape-design/components-themeable/theming";

const theme = { /* your theme */ };

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default defineConfig({
  // ...
  plugins: [
    {
      apply: "build",
      async buildStart() {
        console.log("Building Cloudscape themed components");
        await buildThemedComponents({ theme, outputDir: path.join(__dirname, "./src/components/themed") })…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pan-kot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants