Skip to content

Commit

Permalink
chore: update re-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Jul 3, 2024
1 parent c945166 commit b01a4ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
5 changes: 0 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
"import": "./dist/mjs/react/index.js",
"types": "./dist/mjs/react/index.d.ts"
},
"./rsc": {
"import": "./dist/mjs/rsc/index.js",
"require": "./dist/cjs/rsc/index.js",
"types": "./dist/mjs/rsc/index.d.ts"
},
"./test": "./test/server.ts"
},
"files": [
Expand Down
1 change: 0 additions & 1 deletion packages/core/rsc.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core/rsc.js

This file was deleted.

8 changes: 8 additions & 0 deletions packages/core/src/rsc/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
export * from './components/BlocksRenderer';

// re-export the rest of the React components
export * from '../react/components/HtmlDecoder';
export * from '../react/components/SafeHtml';
export * from '../react/components/Link';
export * from '../react/components/Menu';

export * from '../react/provider';
export * from '../react/utils';
// TODO: add blocks once they have been refactored
2 changes: 2 additions & 0 deletions projects/wp-nextjs-app/src/app/api/preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { setHeadlessConfig } from '@headstartwp/core';
import config from '../../../../headstartwp.config';

setHeadlessConfig(config);

export async function GET(request: NextRequest) {
// @ts-expect-error
return previewRouteHandler(request);
}
3 changes: 1 addition & 2 deletions projects/wp-nextjs-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"strictBindCallApply": true,
"strictNullChecks": true,
"customConditions": ["react-server"]
"strictNullChecks": true
},
"include": [
"next-env.d.ts",
Expand Down

0 comments on commit b01a4ba

Please sign in to comment.