Skip to content

Commit

Permalink
better handling of exports client/server
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Sep 23, 2024
1 parent 0f8a4fc commit 4f8597d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/odd-onions-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solid-js": minor
---

better handling of exports client/server
8 changes: 4 additions & 4 deletions .changeset/tasty-knives-rhyme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"babel-preset-solid": patch
"solid-js": patch
"solid-element": patch
"test-integration": patch
"babel-preset-solid": minor
"solid-js": minor
"solid-element": minor
"test-integration": minor
---

update dom-expressions
Expand Down
6 changes: 1 addition & 5 deletions packages/solid/store/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function createMutable<T>(state: T | Store<T>): T {
}

export function modifyMutable<T>(state: T, modifier: (state: T) => T) {
notSup();
modifier(state);
}

type ReconcileOptions = {
Expand Down Expand Up @@ -155,7 +155,3 @@ export function produce<T>(fn: (state: T) => void): (state: T) => T {
}

export const DEV = undefined;

function notSup(): never {
throw new Error("not supported on server side");
}
9 changes: 0 additions & 9 deletions packages/solid/web/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ export {
export const isServer: boolean = true;
export const isDev: boolean = false;

// Types for these come from dom-expressions/src/server.d.ts
// These override the functions from dom-expressions that throw on the serverside.
export function render() {}
export function hydrate() {}
export function insert() {}
export function spread() {}
export function addEventListener() {}
export function delegateEvents(): void {}

export function Dynamic<T>(
props: T & { children?: any; component?: Component<T> | string | keyof JSX.IntrinsicElements }
) {
Expand Down

0 comments on commit 4f8597d

Please sign in to comment.