Skip to content

Commit ddc352e

Browse files
committed
feat: add zephyr as an option
1 parent b353733 commit ddc352e

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

frameworks/react-cra/add-ons/zephyr/assets/vite.config.ts.append

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "Zephyr Cloud",
3+
"description": "The fastest way to go from idea to production.",
4+
"phase": "add-on",
5+
"modes": ["file-router", "code-router"],
6+
"link": "https://zephyr-cloud.io/",
7+
"type": "add-on"
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"vite-plugin-zephyr": "latest"
4+
}
5+
}
Lines changed: 12 additions & 0 deletions
Loading

frameworks/react-cra/project/base/vite.config.ts.ejs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import viteReact from "@vitejs/plugin-react";<% if (tailwind) { %>
33
import tailwindcss from "@tailwindcss/vite";
44
<% } %><%if (fileRouter) { %>
55
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";<% } %><% if (addOnEnabled['module-federation']) { %>
6-
import { federation } from "@module-federation/vite";<% } %>
6+
import { federation } from "@module-federation/vite";<% } %><% if (addOnEnabled.zephyr) { %>
7+
import { withZephyr } from 'vite-plugin-zephyr';<% } %>
78
import { resolve } from "node:path";<% if (addOnEnabled['module-federation']) { %>
89
import federationConfig from "./module-federation.config.js";
910
<% } %>
1011

1112
// https://vitejs.dev/config/
1213
export default defineConfig({
13-
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
14+
plugins: [<% if(fileRouter) { %>TanStackRouterVite({ autoCodeSplitting: true }), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %><% if (addOnEnabled.zephyr) { %>, withZephyr(<% if (addOnEnabled['module-federation']) { %>{ mfConfig: federationConfig }<% } %>)<% } %>],
1415
test: {
1516
globals: true,
1617
environment: "jsdom",

0 commit comments

Comments
 (0)