Skip to content

Commit

Permalink
move server stuff to its own Vite plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Jul 21, 2024
1 parent 69d85db commit 3e32028
Show file tree
Hide file tree
Showing 10 changed files with 364 additions and 291 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-penguins-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rescript-relay-router": patch
---

Move server stuff into its own Vite plugin since its not complete and currently not under development.
2 changes: 1 addition & 1 deletion examples/client-rendering/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"package-specs": [
{
"module": "es6",
"module": "esmodule",
"in-source": true
}
],
Expand Down
2 changes: 1 addition & 1 deletion examples/express/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"package-specs": [
{
"module": "es6",
"module": "esmodule",
"in-source": true
}
],
Expand Down
4 changes: 2 additions & 2 deletions examples/express/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from "vite";
import reactRefresh from "@vitejs/plugin-react-refresh";
import { visualizer } from "rollup-plugin-visualizer";
import { rescriptRelayVitePlugin } from "rescript-relay-router/RescriptRelayVitePlugin.mjs";
import { rescriptRelayVitePlugin } from "rescript-relay-router/server";
import { virtualIndex } from "rescript-relay-router/VirtualIndex.mjs";

export default defineConfig({
Expand All @@ -23,7 +23,7 @@ export default defineConfig({
// Work around the fact that rescript-relay is not yet an ESM module
// which messes up imports on NodeJs.
"rescript-relay",
]
],
},
build: {
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/rescript-relay-router/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ stats.html

# Commit our Vite plugins written in plain JavaScript.
!vite-plugins/**/*.mjs
!test/RescriptRelayVitePlugin.test.mjs
!test/RescriptRelayServerVitePlugin.test.mjs
1 change: 1 addition & 0 deletions packages/rescript-relay-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"main": "./RescriptRelayVitePlugin.mjs",
"exports": {
".": "./vite-plugins/RescriptRelayVitePlugin.mjs",
"./server": "./vite-plugins/RescriptRelayServerVitePlugin.mjs",
"./src/*": "./src/*",
"./cli/RescriptRelayRouterCli__Commands.mjs": "./cli/RescriptRelayRouterCli__Commands.mjs",
"./RescriptRelayVitePlugin.mjs": "./vite-plugins/RescriptRelayVitePlugin.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/rescript-relay-router/rescript.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"package-specs": [
{
"module": "es6",
"module": "esmodule",
"in-source": true
}
],
Expand Down
Loading

0 comments on commit 3e32028

Please sign in to comment.