Skip to content

Commit 2ad2b4d

Browse files
Version Packages (alpha) (#1808)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to v1, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `v1` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `v1`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases ## @arkenv/rsbuild-plugin@1.0.0-alpha.1 ### Minor Changes - #### Add `@arkenv/rsbuild-plugin` for Rsbuild and TanStack Start _[`#1802`](#1802) [`b13f263`](b13f263) [@yamcodes](https://github.com/yamcodes)_ The new `@arkenv/rsbuild-plugin` brings the same server/client env path as `@arkenv/vite-plugin` to Rsbuild projects, including TanStack Start apps built with Rsbuild: - **Client rewrite**: in `web` and `web-worker` environments, the `env.ts` module is replaced with a scrubbed client module — public/shared keys (default prefix `PUBLIC_`) are inlined as coerced literals and server-only keys become throwing getters, so secrets never reach the browser bundle. - **Server passthrough**: in `node` environments the real `env.ts` runs unchanged against the deployment environment. - **Build-time validation**: the schema is validated via `@arkenv/build` before each environment compiles; missing or invalid required variables fail the build before assets are emitted. - **Dev reload**: the schema and `.env*` files are registered as build dependencies, so edits re-validate and refresh inlined values during `rsbuild dev`. - **Standard Schema**: an `@arkenv/rsbuild-plugin/standard` entry mirrors the ArkType-free path of `@arkenv/vite-plugin/standard`. Usage: ```ts // rsbuild.config.ts import { defineConfig } from "@rsbuild/core"; import { arkenvPlugin } from "@arkenv/rsbuild-plugin"; export default defineConfig({ plugins: [arkenvPlugin({ schemaPath: "src/env.ts" })], }); ``` Install with `npm install @arkenv/rsbuild-plugin arktype`. Co-authored-by: arkenv-bot[bot] <237618717+arkenv-bot[bot]@users.noreply.github.com>
1 parent b13f263 commit 2ad2b4d

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @arkenv/rsbuild-plugin
2+
3+
## 1.0.0-alpha.1
4+
5+
### Minor Changes
6+
7+
- #### Add `@arkenv/rsbuild-plugin` for Rsbuild and TanStack Start _[`#1802`](https://github.com/yamcodes/arkenv/pull/1802) [`b13f263`](https://github.com/yamcodes/arkenv/commit/b13f263a5a4828c08adf5ca156b5171901da02b8) [@yamcodes](https://github.com/yamcodes)_
8+
9+
10+
The new `@arkenv/rsbuild-plugin` brings the same server/client env path as `@arkenv/vite-plugin` to Rsbuild projects, including TanStack Start apps built with Rsbuild:
11+
12+
- **Client rewrite**: in `web` and `web-worker` environments, the `env.ts` module is replaced with a scrubbed client module — public/shared keys (default prefix `PUBLIC_`) are inlined as coerced literals and server-only keys become throwing getters, so secrets never reach the browser bundle.
13+
- **Server passthrough**: in `node` environments the real `env.ts` runs unchanged against the deployment environment.
14+
- **Build-time validation**: the schema is validated via `@arkenv/build` before each environment compiles; missing or invalid required variables fail the build before assets are emitted.
15+
- **Dev reload**: the schema and `.env*` files are registered as build dependencies, so edits re-validate and refresh inlined values during `rsbuild dev`.
16+
- **Standard Schema**: an `@arkenv/rsbuild-plugin/standard` entry mirrors the ArkType-free path of `@arkenv/vite-plugin/standard`.
17+
18+
Usage:
19+
20+
```ts
21+
// rsbuild.config.ts
22+
import { defineConfig } from "@rsbuild/core";
23+
import { arkenvPlugin } from "@arkenv/rsbuild-plugin";
24+
25+
export default defineConfig({
26+
plugins: [arkenvPlugin({ schemaPath: "src/env.ts" })],
27+
});
28+
```
29+
30+
Install with `npm install @arkenv/rsbuild-plugin arktype`.

packages/rsbuild-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arkenv/rsbuild-plugin",
3-
"version": "1.0.0-alpha.0",
3+
"version": "1.0.0-alpha.1",
44
"author": "Yam Borodetsky <yam@yam.codes>",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)