Skip to content

Commit

Permalink
Fix user config access in done hook
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Nov 29, 2023
1 parent c7eae7c commit 1016921
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/starlight/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import { vitePluginStarlightUserConfig } from './integrations/virtual-user-confi
import { rehypeRtlCodeSupport } from './integrations/code-rtl-support';
import { createTranslationSystemFromFs } from './utils/translations-fs';
import { runPlugins, type StarlightUserConfigWithPlugins } from './utils/plugins';
import type { StarlightConfig } from './types';

export default function StarlightIntegration({
plugins,
...opts
}: StarlightUserConfigWithPlugins): AstroIntegration {
let userConfig: StarlightConfig;
return {
name: '@astrojs/starlight',
hooks: {
Expand All @@ -33,6 +35,7 @@ export default function StarlightIntegration({
isRestart,
logger,
});
userConfig = starlightConfig;

const useTranslations = createTranslationSystemFromFs(starlightConfig, config);

Expand Down

0 comments on commit 1016921

Please sign in to comment.