Skip to content

Commit

Permalink
restore require in client entry
Browse files Browse the repository at this point in the history
  • Loading branch information
DanDroryAu committed Dec 23, 2024
1 parent 1baa016 commit aa32520
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions packages/sku/src/entry/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import client from '__sku_alias__clientEntry';

import { loadableReady } from '@loadable/component';
import { createRequire } from 'node:module';

import clientContextKey from '../clientContextKey.js';

const require = createRequire(import.meta.url);

if (process.env.NODE_ENV === 'development') {
if (typeof client !== 'function') {
// eslint-disable-next-line
throw new Error(require('dedent')`
The sku client entry ('${__SKU_CLIENT_PATH__}') must export a function that calls hydrateRoot. e.g.
Expand Down
3 changes: 0 additions & 3 deletions packages/sku/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@
"exclude": [
"node_modules",
"**/@loadable",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.test.js"
]
}

0 comments on commit aa32520

Please sign in to comment.