@rudderjs/vite 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Suleiman Shahbari
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @rudderjs/vite
2
+
3
+ Vite plugin for RudderJS. Registers Vike (SSR), sets the `@/` path alias, externalizes server-only packages from the client bundle, and wires up WebSocket upgrade handling for `@rudderjs/broadcast` and `@rudderjs/live`.
4
+
5
+ ```bash
6
+ pnpm add @rudderjs/vite
7
+ ```
8
+
9
+ ---
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ // vite.config.ts
15
+ import { defineConfig } from 'vite'
16
+ import rudderjs from '@rudderjs/vite'
17
+ import tailwindcss from '@tailwindcss/vite'
18
+ import react from '@vitejs/plugin-react'
19
+
20
+ export default defineConfig({
21
+ plugins: [rudderjs(), tailwindcss(), react()],
22
+ })
23
+ ```
24
+
25
+ That's it. `rudderjs()` handles:
26
+
27
+ - **Vike registration** — auto-detects and registers `vike/plugin` for SSR + file-based routing
28
+ - **Path alias** — `@/` resolves to `src/` in the project root
29
+ - **SSR externals** — server-only packages (database drivers, Redis, queue adapters) are externalized from the client bundle
30
+ - **SSR no-externals** — `@rudderjs/server-hono` is forced non-external so Vite processes virtual module imports
31
+ - **WebSocket upgrade** — intercepts `http.createServer` to attach the `__rudderjs_ws_upgrade__` handler for `@rudderjs/broadcast` and `@rudderjs/live`
32
+ - **Sourcemap warnings** — suppresses noisy "missing source files" warnings for `@rudderjs/*` packages
33
+ - **Build externals** — server-only packages are excluded from production builds
34
+
35
+ ## What it produces
36
+
37
+ Three Vite plugins:
38
+
39
+ | Plugin | Purpose |
40
+ |--------|---------|
41
+ | `rudderjs:ws` | WebSocket upgrade handler via `configureServer` |
42
+ | `rudderjs:config` | SSR externals, path alias, warning suppression |
43
+ | *(vike plugins)* | SSR rendering, file-based routing (auto-registered) |
44
+
45
+ ## SSR Externals
46
+
47
+ These packages are externalized from the SSR bundle (Node.js-only, not browser-compatible):
48
+
49
+ - `@rudderjs/queue-inngest`, `@rudderjs/queue-bullmq`, `@rudderjs/orm-drizzle`
50
+ - Database drivers: `pg`, `mysql2`, `better-sqlite3`, `@prisma/adapter-*`, `@libsql/client`
51
+ - Redis: `ioredis`
52
+ - CLI prompts: `@clack/core`, `@clack/prompts`
53
+
54
+ ## Peer Dependencies
55
+
56
+ | Package | Required | Notes |
57
+ |---------|----------|-------|
58
+ | `vite` | Yes | Build tool |
59
+ | `vike` | Yes | SSR framework |
60
+ | `@vitejs/plugin-react` | Optional | For React projects |
61
+ | `@vitejs/plugin-vue` | Optional | For Vue projects |
62
+ | `vike-solid` | Optional | For Solid projects |
63
+
64
+ ## Framework Plugins
65
+
66
+ Add your UI framework plugin separately — `rudderjs()` does not include one:
67
+
68
+ ```ts
69
+ // React
70
+ import react from '@vitejs/plugin-react'
71
+ plugins: [rudderjs(), react()]
72
+
73
+ // Vue
74
+ import vue from '@vitejs/plugin-vue'
75
+ plugins: [rudderjs(), vue()]
76
+
77
+ // Solid
78
+ import solid from 'vite-plugin-solid'
79
+ plugins: [rudderjs(), solid()]
80
+ ```
@@ -0,0 +1,23 @@
1
+ import type { Plugin } from 'vite';
2
+ /**
3
+ * RudderJS Vite plugin.
4
+ *
5
+ * Registers Vike, sets the @/ path alias, and externalises RudderJS
6
+ * optional-peer packages from the SSR bundle.
7
+ *
8
+ * Add your UI framework plugin (react, vue, solid…) separately.
9
+ *
10
+ * @example
11
+ * // vite.config.ts
12
+ * import { defineConfig } from 'vite'
13
+ * import rudderjs from '@rudderjs/vite'
14
+ * import tailwindcss from '@tailwindcss/vite'
15
+ * import react from '@vitejs/plugin-react'
16
+ *
17
+ * export default defineConfig({
18
+ * plugins: [rudderjs(), tailwindcss(), react()],
19
+ * })
20
+ */
21
+ export declare function rudderjs(): Promise<Plugin[]>;
22
+ export default rudderjs;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA+ClC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAqI5C;AAED,eAAe,QAAQ,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,200 @@
1
+ import path from 'node:path';
2
+ import { createRequire } from 'node:module';
3
+ // ─── SSR / build externals ─────────────────────────────────
4
+ const SSR_EXTERNALS = [
5
+ // CLI-only — uses node:process stdin/readline
6
+ '@clack/core',
7
+ '@clack/prompts',
8
+ // Queue adapters — server-only
9
+ '@rudderjs/queue-inngest',
10
+ '@rudderjs/queue-bullmq',
11
+ // ORM adapters — server-only
12
+ '@rudderjs/orm-drizzle',
13
+ // Database drivers — Node.js-only, must not be bundled into the client
14
+ 'pg',
15
+ 'mysql2',
16
+ 'better-sqlite3',
17
+ '@prisma/adapter-pg',
18
+ '@prisma/adapter-mysql2',
19
+ '@prisma/adapter-better-sqlite3',
20
+ '@prisma/adapter-libsql',
21
+ '@libsql/client',
22
+ // Redis — server-only
23
+ 'ioredis',
24
+ // Storage — server-only (uses node:fs, node:path)
25
+ '@rudderjs/storage',
26
+ // Image — uses sharp (native binary)
27
+ '@rudderjs/image',
28
+ // Optional icon adapters — may not be installed
29
+ '@tabler/icons-react',
30
+ '@phosphor-icons/react',
31
+ '@remixicon/react',
32
+ ];
33
+ // ─── SSR no-externals ──────────────────────────────────────
34
+ const SSR_NO_EXTERNALS = [
35
+ '@rudderjs/server-hono',
36
+ ];
37
+ // ─── Helpers ───────────────────────────────────────────────
38
+ // Resolve from the app root so we pick up the user's installed packages,
39
+ // not a copy inside packages/vite/node_modules.
40
+ const _require = createRequire(process.cwd() + '/package.json');
41
+ // ─── Main plugin ───────────────────────────────────────────
42
+ /**
43
+ * RudderJS Vite plugin.
44
+ *
45
+ * Registers Vike, sets the @/ path alias, and externalises RudderJS
46
+ * optional-peer packages from the SSR bundle.
47
+ *
48
+ * Add your UI framework plugin (react, vue, solid…) separately.
49
+ *
50
+ * @example
51
+ * // vite.config.ts
52
+ * import { defineConfig } from 'vite'
53
+ * import rudderjs from '@rudderjs/vite'
54
+ * import tailwindcss from '@tailwindcss/vite'
55
+ * import react from '@vitejs/plugin-react'
56
+ *
57
+ * export default defineConfig({
58
+ * plugins: [rudderjs(), tailwindcss(), react()],
59
+ * })
60
+ */
61
+ export function rudderjs() {
62
+ // Build plugins asynchronously — we need a dynamic import to guarantee we
63
+ // load vike from the *app root* (not packages/vite/node_modules).
64
+ const promise = (async () => {
65
+ let vikePlugins = [];
66
+ try {
67
+ const vikePath = _require.resolve('vike/plugin');
68
+ const vikeMod = await import(vikePath);
69
+ vikePlugins = await vikeMod.default();
70
+ }
71
+ catch {
72
+ console.warn('[RudderJS] vike not found — install vike to enable SSR support.');
73
+ }
74
+ return [
75
+ ...vikePlugins,
76
+ {
77
+ name: 'rudderjs:ws',
78
+ configureServer(server) {
79
+ // Attach the WebSocket upgrade handler to Vite's own HTTP server.
80
+ // @rudderjs/broadcast and @rudderjs/live register their handlers on
81
+ // globalThis['__rudderjs_ws_upgrade__'] during provider boot. We listen
82
+ // for 'upgrade' events and forward them to that handler.
83
+ //
84
+ // Set a sentinel flag so @rudderjs/server-hono's module-load patch knows
85
+ // to skip — otherwise both would attach upgrade listeners and
86
+ // handleUpgrade() would be called twice for the same socket.
87
+ const _G = globalThis;
88
+ if (_G['__rudderjs_http_upgrade_patched__'])
89
+ return;
90
+ _G['__rudderjs_http_upgrade_patched__'] = true;
91
+ // Buffer early upgrade requests that arrive before providers have
92
+ // registered __rudderjs_ws_upgrade__ (the page SSR can trigger a
93
+ // browser WS connect before provider boot finishes).
94
+ let pending = [];
95
+ const flush = () => {
96
+ if (!pending)
97
+ return;
98
+ const handler = _G['__rudderjs_ws_upgrade__'];
99
+ if (!handler)
100
+ return;
101
+ const queued = pending;
102
+ pending = null;
103
+ for (const [r, s, h] of queued)
104
+ handler(r, s, h);
105
+ };
106
+ // Poll briefly for the handler to appear (providers boot async)
107
+ const interval = setInterval(() => {
108
+ if (_G['__rudderjs_ws_upgrade__']) {
109
+ flush();
110
+ clearInterval(interval);
111
+ }
112
+ }, 50);
113
+ setTimeout(() => clearInterval(interval), 10_000);
114
+ server.httpServer?.on('upgrade', (req, socket, head) => {
115
+ // Skip Vite's own HMR WebSocket (handled by Vite internally)
116
+ if (req.headers['sec-websocket-protocol'] === 'vite-hmr')
117
+ return;
118
+ if (req.headers['sec-websocket-protocol'] === 'vite-ping')
119
+ return;
120
+ const handler = _G['__rudderjs_ws_upgrade__'];
121
+ if (handler) {
122
+ handler(req, socket, head);
123
+ }
124
+ else if (pending) {
125
+ pending.push([req, socket, head]);
126
+ }
127
+ });
128
+ },
129
+ },
130
+ {
131
+ name: 'rudderjs:config',
132
+ configResolved(config) {
133
+ // Suppress "Sourcemap points to missing source files" for @rudderjs/* packages.
134
+ // Vite emits these via logger.warnOnce() when published dist/ has sourcemaps
135
+ // referencing the original .ts sources not shipped in the npm package.
136
+ const filter = (msg) =>
137
+ // Suppress sourcemap warnings for published @rudderjs/* packages
138
+ msg.includes('Sourcemap') &&
139
+ msg.includes('missing source files') &&
140
+ msg.includes('@rudderjs');
141
+ const origWarn = config.logger.warn.bind(config.logger);
142
+ const origWarnOnce = config.logger.warnOnce.bind(config.logger);
143
+ config.logger.warn = (msg, opts) => { if (!filter(msg))
144
+ origWarn(msg, opts); };
145
+ config.logger.warnOnce = (msg, opts) => { if (!filter(msg))
146
+ origWarnOnce(msg, opts); };
147
+ },
148
+ config() {
149
+ return {
150
+ resolve: {
151
+ alias: [
152
+ { find: '@', replacement: path.resolve(process.cwd(), 'src') },
153
+ { find: /^App\//, replacement: path.resolve(process.cwd(), 'app') + '/' },
154
+ ],
155
+ },
156
+ ssr: {
157
+ external: SSR_EXTERNALS,
158
+ noExternal: SSR_NO_EXTERNALS,
159
+ },
160
+ build: {
161
+ rollupOptions: {
162
+ external: (id, importer, isResolved) => {
163
+ // Externalize known server-only packages
164
+ if (SSR_EXTERNALS.some(e => id === e || id.startsWith(e + '/')))
165
+ return true;
166
+ // Externalize node: built-ins that leak through @rudderjs/* packages
167
+ if (id.startsWith('node:'))
168
+ return true;
169
+ return false;
170
+ },
171
+ onwarn(warning, warn) {
172
+ // Suppress "externalized for browser compatibility" for server-only
173
+ // packages — node:crypto (middleware), node:module (support), ioredis.
174
+ if (warning.message.includes('has been externalized for browser compatibility') &&
175
+ (warning.message.includes('/packages/middleware/') ||
176
+ warning.message.includes('/packages/support/') ||
177
+ warning.message.includes('/packages/storage/') ||
178
+ warning.message.includes('ioredis')))
179
+ return;
180
+ // Suppress sourcemap errors from vendor:publish copies (tsx without maps).
181
+ if (warning.message.includes('Error when using sourcemap'))
182
+ return;
183
+ warn(warning);
184
+ },
185
+ },
186
+ },
187
+ };
188
+ },
189
+ },
190
+ ];
191
+ })();
192
+ // Attach _vikeVitePluginOptions to the Promise itself.
193
+ // Vike's self-detection scans the *raw* (unresolved) plugins array for this
194
+ // property — finding it here prevents the deprecation warning and the
195
+ // "added 2 times" double-registration error.
196
+ Object.assign(promise, { _vikeVitePluginOptions: {} });
197
+ return promise;
198
+ }
199
+ export default rudderjs;
200
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,8DAA8D;AAE9D,MAAM,aAAa,GAAG;IACpB,8CAA8C;IAC9C,aAAa;IACb,gBAAgB;IAChB,+BAA+B;IAC/B,yBAAyB;IACzB,wBAAwB;IACxB,6BAA6B;IAC7B,uBAAuB;IACvB,uEAAuE;IACvE,IAAI;IACJ,QAAQ;IACR,gBAAgB;IAChB,oBAAoB;IACpB,wBAAwB;IACxB,gCAAgC;IAChC,wBAAwB;IACxB,gBAAgB;IAChB,sBAAsB;IACtB,SAAS;IACT,kDAAkD;IAClD,mBAAmB;IACnB,qCAAqC;IACrC,iBAAiB;IACjB,gDAAgD;IAChD,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;CACnB,CAAA;AAED,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG;IACvB,uBAAuB;CACxB,CAAA;AAED,8DAA8D;AAE9D,yEAAyE;AACzE,gDAAgD;AAChD,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,eAAe,CAAC,CAAA;AAE/D,8DAA8D;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,QAAQ;IACtB,0EAA0E;IAC1E,kEAAkE;IAClE,MAAM,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,GAAG,GAAG,CAAC,CAAC;wCAAE,OAAO,IAAI,CAAA;oCAC5E,qEAAqE;oCACrE,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;wCAAE,OAAO,IAAI,CAAA;oCACvC,OAAO,KAAK,CAAA;gCACd,CAAC;gCACD,MAAM,CAAC,OAAO,EAAE,IAAI;oCAClB,oEAAoE;oCACpE,uEAAuE;oCACvE,IACE,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iDAAiD,CAAC;wCAC3E,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC;4CAChD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;4CAC9C,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;4CAC9C,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;wCACtC,OAAM;oCACR,2EAA2E;oCAC3E,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAC;wCAAE,OAAM;oCAClE,IAAI,CAAC,OAAO,CAAC,CAAA;gCACf,CAAC;6BACF;yBACF;qBACF,CAAA;gBACH,CAAC;aACF;SACF,CAAA;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,uDAAuD;IACvD,4EAA4E;IAC5E,sEAAsE;IACtE,6CAA6C;IAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,CAAC,CAAA;IAEtD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,eAAe,QAAQ,CAAA"}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@rudderjs/vite",
3
+ "version": "0.0.5",
4
+ "license": "MIT",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/rudderjs/rudder",
8
+ "directory": "packages/vite"
9
+ },
10
+ "type": "module",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "types": "./dist/index.d.ts"
20
+ }
21
+ },
22
+ "peerDependencies": {
23
+ "vite": ">=5.0.0",
24
+ "vike": ">=0.4.0",
25
+ "@vitejs/plugin-react": ">=4.0.0",
26
+ "@vitejs/plugin-vue": ">=5.0.0",
27
+ "vike-solid": ">=0.8.0"
28
+ },
29
+ "peerDependenciesMeta": {
30
+ "@vitejs/plugin-react": {
31
+ "optional": true
32
+ },
33
+ "@vitejs/plugin-vue": {
34
+ "optional": true
35
+ },
36
+ "vike-solid": {
37
+ "optional": true
38
+ }
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^20.0.0",
42
+ "@vitejs/plugin-react": "^4.3.4",
43
+ "@vitejs/plugin-vue": "^5.0.0",
44
+ "typescript": "^5.4.0",
45
+ "vike": "^0.4.239",
46
+ "vike-solid": "^0.8.1",
47
+ "vite": "^7.1.0"
48
+ },
49
+ "author": "Suleiman Shahbari",
50
+ "scripts": {
51
+ "build": "tsc -p tsconfig.build.json",
52
+ "dev": "tsc -p tsconfig.build.json --watch",
53
+ "typecheck": "tsc --noEmit",
54
+ "lint": "eslint src",
55
+ "test": "tsc -p tsconfig.test.json && node --test dist-test/index.test.js; EXIT=$?; rm -rf dist-test; exit $EXIT",
56
+ "clean": "rm -rf dist"
57
+ }
58
+ }