File tree Expand file tree Collapse file tree 5 files changed +16
-6
lines changed Expand file tree Collapse file tree 5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1- // import { isServer } from "@plexusjs/utils/dist/shared"
21import {
32 AlmostAnything ,
43 PlexusWatchableValueInterpreter ,
@@ -71,7 +70,6 @@ export class ComputedStateInstance<
7170 this . mount ( )
7271 }
7372 private mount ( ) {
74- // if (isServer()) return
7573 if ( ! this . instance ( ) . _computedStates . has ( this ) ) {
7674 this . instance ( ) . _computedStates . add ( this )
7775 this . instance ( ) . runtime . log (
Original file line number Diff line number Diff line change 44 "lib" : [" dom" ],
55 "types" : [" bun-types" ],
66 "rootDir" : " ./src" ,
7- "outDir" : " ./dist/src " ,
7+ "outDir" : " ./dist" ,
88 "emitDeclarationOnly" : true
99 },
1010 "include" : [" ./src/**/*" ]
Original file line number Diff line number Diff line change 1+ /// <reference lib="dom" />
2+ /// <reference lib="dom.iterable" />
3+
14import {
25 instance ,
36 PlexusCollectionSelector ,
@@ -126,7 +129,9 @@ export function loadServerState(
126129}
127130
128131export function isServer ( ) {
129- return typeof process !== 'undefined' && process ?. release ?. name === 'node'
132+ return (
133+ typeof process !== 'undefined' && ( process . env . SERVER_SOFTWARE || ! window )
134+ )
130135}
131136
132137const PlexusNext = createPlexusPlugin ( 'NextJS' , ( ) => {
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ type HTMLDivElementPropKeys = keyof HTMLProps<HTMLElement>
1414export function usePlexusElementEffect <
1515 ElementType extends HTMLElement ,
1616 PlexusType = any ,
17- PropertyKey extends HTMLProps < HTMLElement > [ HTMLDivElementPropKeys ] = HTMLProps < HTMLElement > [ HTMLDivElementPropKeys ]
17+ PropertyKey extends
18+ HTMLProps < HTMLElement > [ HTMLDivElementPropKeys ] = HTMLProps < HTMLElement > [ HTMLDivElementPropKeys ] ,
1819> (
1920 elRef : MutableRefObject < ElementType > ,
2021 plexusState : Watchable < PlexusType > ,
Original file line number Diff line number Diff line change 1+ /// <reference lib="dom" />
2+ /// <reference lib="dom.iterable" />
3+
14export * from './itemManipulation'
5+
26export function isServer ( ) {
3- return typeof process !== 'undefined' && process ?. release ?. name === 'node'
7+ return (
8+ typeof process !== 'undefined' && ( process . env . SERVER_SOFTWARE || ! window )
9+ )
410}
511export const genUID = ( ) =>
612 Math . random ( ) . toString ( 36 ) . substring ( 2 , 15 ) +
You can’t perform that action at this time.
0 commit comments