Skip to content

Commit

Permalink
Update Vite config to support MDX
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Sep 9, 2024
1 parent 5ad2d4d commit a7fb32f
Show file tree
Hide file tree
Showing 3 changed files with 595 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"@graphql-codegen/cli": "^4.0.1",
"@graphql-codegen/client-preset": "^4.0.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@mdx-js/rollup": "^3.0.1",
"@storybook/addon-actions": "^8.2.9",
"@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.2.9",
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts → vite.config.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import mdx from "@mdx-js/rollup";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import EnvironmentPlugin from "vite-plugin-environment";
Expand All @@ -7,5 +8,5 @@ const CHROMATIC_BASE_URL = process.env.CHROMATIC_BASE_URL || "https://www.chroma
// https://vitejs.dev/config/
export default defineConfig({
define: { "process.env": { CHROMATIC_BASE_URL } },
plugins: [react(), EnvironmentPlugin({ CHROMATIC_BASE_URL })],
plugins: [mdx(), react(), EnvironmentPlugin({ CHROMATIC_BASE_URL })],
});
Loading

0 comments on commit a7fb32f

Please sign in to comment.