Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"tailwindcss": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plus": "catalog:",
"wrangler": "catalog:"
}
}
6 changes: 3 additions & 3 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import vinext from "vinext";
import { defineConfig } from "vite";
import { defineConfig, lazyPlugins } from "vite-plus";
import { kvDataAdapter } from "@vinext/cloudflare/cache/kv-data-adapter";
import { imageAdapter } from "@vinext/cloudflare/images/images-optimizer";
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext({
cache: {
data: kvDataAdapter(),
Expand All @@ -20,5 +20,5 @@ export default defineConfig({
childEnvironments: ["ssr"],
},
}),
],
]),
});
4 changes: 2 additions & 2 deletions benchmarks/vinext/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from "vite-plus";
import { defineConfig, lazyPlugins } from "vite-plus";
import vinext from "vinext";

export default defineConfig({
plugins: [vinext()],
plugins: lazyPlugins(() => [vinext()]),
});
5 changes: 3 additions & 2 deletions examples/app-router-cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import { imageAdapter } from "@vinext/cloudflare/images/images-optimizer";
import path from "node:path";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext({ images: { optimizer: imageAdapter() } }),
cloudflare({
// The worker entry runs in the RSC environment, with SSR as a child.
Expand All @@ -14,7 +15,7 @@ export default defineConfig({
childEnvironments: ["ssr"],
},
}),
],
]),
resolve: {
alias: {
"@test/og-font": path.resolve(
Expand Down
5 changes: 3 additions & 2 deletions examples/app-router-nitro/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineConfig } from "vite";
import vinext from "vinext";
import { nitro } from "nitro/vite";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext(),
nitro(),
],
]),
});
4 changes: 2 additions & 2 deletions examples/app-router-playground/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"baseUrl": ".",
"paths": { "#/*": ["./*"] },
"paths": { "#/*": ["./*"],
"*": ["./*"] },
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.
"plugins": [{ "name": "next" }]
},
"include": [
Expand Down
6 changes: 3 additions & 3 deletions examples/app-router-playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vite-plus";
import { defineConfig, lazyPlugins } from "vite-plus";
import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import { imageAdapter } from "@vinext/cloudflare/images/images-optimizer";
Expand All @@ -21,7 +21,7 @@ const codeHikeConfig: CodeHikeConfig = {
* To deploy to Cloudflare: npx wrangler deploy
*/
export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
// Shim React canary APIs (ViewTransition, addTransitionType) that don't
// exist in stable React 19. Provides no-op replacements so the
// view-transitions page degrades gracefully instead of crashing.
Expand Down Expand Up @@ -84,7 +84,7 @@ export default defineConfig({
childEnvironments: ["ssr"],
},
}),
],
]),

resolve: {
alias: {
Expand Down
5 changes: 3 additions & 2 deletions examples/benchmarks/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { defineConfig } from "vite";
import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import tailwindcss from "@tailwindcss/vite";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext(),
cloudflare({
viteEnvironment: {
Expand All @@ -13,5 +14,5 @@ export default defineConfig({
},
}),
tailwindcss(),
],
]),
});
3 changes: 2 additions & 1 deletion examples/fumadocs-docs-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"vinext": "workspace:*",
"vite": "catalog:",
"wrangler": "catalog:",
"@cloudflare/vite-plugin": "catalog:"
"@cloudflare/vite-plugin": "catalog:",
"vite-plus": "catalog:"
}
}
3 changes: 1 addition & 2 deletions examples/fumadocs-docs-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
Expand All @@ -17,7 +16,7 @@
"incremental": true,
"paths": {
"@/*": ["./*"],
"collections/*": [".source/*"]
"collections/*": ["./.source/*"]
},
"plugins": [
{
Expand Down
6 changes: 3 additions & 3 deletions examples/fumadocs-docs-template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from "vite-plus";
import { defineConfig, lazyPlugins } from "vite-plus";
import vinext from "vinext";
import tailwindcss from "@tailwindcss/vite";
import mdx from 'fumadocs-mdx/vite';
Expand All @@ -21,9 +21,9 @@ export default defineConfig({
"@unpic/react",
],
},
plugins: [
plugins: lazyPlugins(() => [
tailwindcss(),
mdx(MdxConfig),,
vinext(),
],
]),
Comment on lines +24 to +28

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a double comma after mdx(MdxConfig) which creates an empty/undefined slot in the plugins array. This can lead to unexpected behavior or errors during Vite's plugin resolution. Let's clean it up by removing the extra comma.

Suggested change
plugins: lazyPlugins(() => [
tailwindcss(),
mdx(MdxConfig),,
vinext(),
],
]),
plugins: lazyPlugins(() => [
tailwindcss(),
mdx(MdxConfig),
vinext(),
]),

});
1 change: 0 additions & 1 deletion examples/hackernews/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"esModuleInterop": true,
"skipLibCheck": true,
"allowJs": true,
"baseUrl": ".",
"noEmit": true,
"types": [
"@cloudflare/workers-types"
Expand Down
5 changes: 3 additions & 2 deletions examples/hackernews/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { defineConfig } from "vite";
import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext(),
cloudflare({
viteEnvironment: {
name: "rsc",
childEnvironments: ["ssr"],
},
}),
],
]),
});
6 changes: 3 additions & 3 deletions examples/nextra-docs-template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineConfig } from "vite-plus";
import { defineConfig, lazyPlugins } from "vite-plus";
import vinext from "vinext";
import mdx from "@mdx-js/rollup";
import { cloudflare } from "@cloudflare/vite-plugin";

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
// MDX support — compiles .mdx files into React components
mdx(),

Expand All @@ -18,5 +18,5 @@ export default defineConfig({
childEnvironments: ["ssr"],
},
}),
],
]),
});
5 changes: 3 additions & 2 deletions examples/pages-router-cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineConfig } from "vite";
import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext(),
cloudflare(),
],
]),
});
5 changes: 3 additions & 2 deletions examples/realworld-api-rest/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineConfig } from "vite";
import vinext from "vinext";
import { cloudflare } from "@cloudflare/vite-plugin";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext(),
cloudflare(),
],
]),
});
3 changes: 2 additions & 1 deletion examples/tpr-demo/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import vinext from "vinext";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [vinext()],
plugins: lazyPlugins(() => [vinext()]),
});
5 changes: 3 additions & 2 deletions examples/workers-cache/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import vinext from "vinext";
import { cdnAdapter } from "@vinext/cloudflare/cache/cdn-adapter";
import { kvDataAdapter } from "@vinext/cloudflare/cache/kv-data-adapter";
import { cloudflare } from "@cloudflare/vite-plugin";
import { lazyPlugins } from 'vite-plus';

export default defineConfig({
plugins: [
plugins: lazyPlugins(() => [
vinext({
cache: {
cdn: cdnAdapter(),
Expand All @@ -18,5 +19,5 @@ export default defineConfig({
childEnvironments: ["ssr"],
},
}),
],
]),
});
1 change: 1 addition & 0 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"devDependencies": {
"@types/node": "catalog:",
"vinext": "workspace:*",
"vite": "catalog:",
"vite-plus": "catalog:"
},
"peerDependencies": {
Expand Down
Loading
Loading