diff --git a/packages/vike-react-chakra/eject.config.js b/packages/vike-react-chakra/eject.config.js new file mode 100644 index 00000000..311db978 --- /dev/null +++ b/packages/vike-react-chakra/eject.config.js @@ -0,0 +1,7 @@ +// This is work-in-progress, see: +// - https://github.com/brillout/playground_eject-vike-react-chakra +// - https://github.com/snake-py/eject/issues/4#issuecomment-2506217514 +export const config = { + files: 'Wrapper.tsx', + operations: ['mv Wrapper.tsx pages/+Wrapper.tsx'], +} diff --git a/packages/vike-react/eject.config.js b/packages/vike-react/eject.config.js new file mode 100644 index 00000000..02a449d8 --- /dev/null +++ b/packages/vike-react/eject.config.js @@ -0,0 +1,14 @@ +// This is work-in-progress, see: +// - https://github.com/brillout/playground_eject-vike-react +// - https://github.com/snake-py/eject/issues/4#issuecomment-2506217514 +export const config = { + files: 'src/*', + operations: [ + 'mv integration renderer', + 'mv config.ts renderer/+config.ts', + 'mv renderer/onRenderHtml.tsx renderer/+onRenderHtml.tsx', + 'mv renderer/onRenderClient.tsx renderer/+onRenderClient.tsx', + 'mv renderer/Loading.tsx renderer/+Loading.tsx', + 'rm index.ts', + ], +} diff --git a/packages/vike-react/src/config.ts b/packages/vike-react/src/config.ts index e9a9706c..99bdeb98 100644 --- a/packages/vike-react/src/config.ts +++ b/packages/vike-react/src/config.ts @@ -5,6 +5,7 @@ import { ssrEffect } from './integration/ssrEffect.js' import { isNotFalse } from './utils/isNotFalse.js' const config = { + // @eject-remove start name: 'vike-react', require: { vike: '>=0.4.182', @@ -17,6 +18,7 @@ const config = { // https://vike.dev/onRenderClient onRenderClient: 'import:vike-react/__internal/integration/onRenderClient:onRenderClient', + // @eject-remove end passToClient: [ '_configFromHook', // https://github.com/vikejs/vike-react/issues/25 @@ -114,7 +116,9 @@ const config = { }, }, } satisfies Config +// @eject-remove start // This is required to make TypeScript load the global interfaces Vike.Config and Vike.PageContext so that they're always loaded: we can assume that the user always imports this file over `import vikeReact from 'vike-react/config'` import './types/Config.js' import './types/PageContext.js' +// @eject-remove end