@octanejs/vite-plugin 0.1.52 → 0.1.53

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.
Files changed (2) hide show
  1. package/README.md +40 -0
  2. package/package.json +3 -4
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # `@octanejs/vite-plugin`
2
+
3
+ Vite integration for Octane: `.tsrx` and eligible `.tsx` compilation for a
4
+ client-only SPA, plus optional routing, streaming SSR, hydration, production
5
+ client/server builds, and preview when an `octane.config.ts` declares routes.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add octane @octanejs/vite-plugin
11
+ pnpm add -D vite
12
+ ```
13
+
14
+ ```ts
15
+ // vite.config.ts
16
+ import { defineConfig } from 'vite';
17
+ import { octane } from '@octanejs/vite-plugin';
18
+
19
+ export default defineConfig({
20
+ plugins: [octane()],
21
+ });
22
+ ```
23
+
24
+ Without `octane.config.ts`, the plugin compiles Octane source and leaves Vite's
25
+ normal client-only SPA behavior intact, including its `import.meta.hot` HMR
26
+ dialect. Add an Octane config with routes to activate the full app layer. See
27
+ the [build tools guide](https://octanejs.dev/docs/build-tools) for the app
28
+ layer, adapters, and options.
29
+
30
+ ## Scoped CSS
31
+
32
+ Scoped `<style>` blocks compile to `injectStyle(hash, css)` calls — one per
33
+ style scope, in lexical order — emitted as module-level statements on the
34
+ client and inside the component body per request on the server, where the
35
+ render collects them into the response's `<style data-octane>` tags. A theme
36
+ (`export const theme = <style>…</style>`) is an ordinary module value, so
37
+ importing it injects its sheet ahead of the importer's own scopes. There is no
38
+ virtual CSS module and no CSS HMR path: editing a block re-evaluates the module
39
+ like any other source change. The plugin needs no CSS loader or extra
40
+ configuration for this.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/vite-plugin",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@ripple-ts/adapter": "^0.3.125",
50
- "@octanejs/app-core": "0.0.48"
50
+ "@octanejs/app-core": "0.0.49"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "octane": "^0.1.51 || ^0.2.0",
@@ -56,8 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@types/node": "^24.13.3",
58
58
  "playwright": "^1.61.1",
59
- "type-fest": "^5.8.0",
60
59
  "vite": "^8.1.5",
61
- "octane": "0.2.0"
60
+ "octane": "0.2.4"
62
61
  }
63
62
  }