diff --git a/packages/next/components.d.ts b/packages/next/components.d.ts new file mode 100644 index 000000000..594a18687 --- /dev/null +++ b/packages/next/components.d.ts @@ -0,0 +1 @@ +export * from './dist/cjs/export/config'; diff --git a/packages/next/package.json b/packages/next/package.json index eb1a08b4c..9fb50df8e 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -14,6 +14,10 @@ "import": "./dist/mjs/export/client.js", "require": "./dist/cjs/export/client.js" }, + "./components": { + "import": "./dist/mjs/export/components.js", + "require": "./dist/cjs/export/components.js" + }, "./config": { "import": "./dist/mjs/export/config.js", "require": "./dist/cjs/export/config.js" diff --git a/packages/next/src/HeadlessProvider.tsx b/packages/next/src/components/HeadlessProvider.tsx similarity index 89% rename from packages/next/src/HeadlessProvider.tsx rename to packages/next/src/components/HeadlessProvider.tsx index f348f14d4..1e2803959 100644 --- a/packages/next/src/HeadlessProvider.tsx +++ b/packages/next/src/components/HeadlessProvider.tsx @@ -1,12 +1,12 @@ import isNil from 'lodash/isNil'; import React from 'react'; -import type { getClient } from './gqty/client'; +import type { getClient } from '../gqty/client'; import { AUTH_CLIENT_CACHE_PROP, CLIENT_CACHE_PROP, PageProps, -} from './server/getProps'; -import { HeadlessContext } from './gqty/client'; +} from '../server/getProps'; +import { HeadlessContext } from '../gqty/client'; /** * The HeadlessProvider is a React component required to properly facilitate SSR and SSG for Faust.js. diff --git a/packages/next/src/components/index.ts b/packages/next/src/components/index.ts new file mode 100644 index 000000000..6c116cb1f --- /dev/null +++ b/packages/next/src/components/index.ts @@ -0,0 +1 @@ +export * from './HeadlessProvider'; diff --git a/packages/next/src/export/components.ts b/packages/next/src/export/components.ts new file mode 100644 index 000000000..c2871479f --- /dev/null +++ b/packages/next/src/export/components.ts @@ -0,0 +1 @@ +export * from '../components'; diff --git a/packages/next/src/export/index.ts b/packages/next/src/export/index.ts index 7cc56010b..1564fb881 100644 --- a/packages/next/src/export/index.ts +++ b/packages/next/src/export/index.ts @@ -1,7 +1,7 @@ export * from '../gqty/client'; export * from '../config/config'; export * from '../server/getProps'; -export * from '../HeadlessProvider'; +export * from '../components/HeadlessProvider'; export * from '../utils'; export * from '../config/withFaust'; export * from '../log/log';