{"record":{"id":"57cc3f9e63b6383b","repo":"withastro/astro","slug":"astrojs-vue-importing-getcontainerrenderer-fr","errorCode":null,"errorMessage":"[@astrojs/vue] Importing `getContainerRenderer` from `@astrojs/vue` is deprecated. Import it from `@astrojs/vue/container-renderer` instead.","messagePattern":"\\[@astrojs/vue\\] Importing `getContainerRenderer` from `@astrojs/vue` is deprecated\\. Import it from `@astrojs/vue/container-renderer` instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/vue/src/index.ts","lineNumber":32,"sourceCode":"interface Options extends VueOptions {\n\tjsx?: boolean | VueJsxOptions;\n\tappEntrypoint?: string;\n\tdevtools?: boolean | Omit<VitePluginVueDevToolsOptions, 'appendTo'>;\n}\n\nfunction getJsxRenderer(): AstroRenderer {\n\treturn {\n\t\tname: '@astrojs/vue (jsx)',\n\t\tclientEntrypoint: '@astrojs/vue/client.js',\n\t\tserverEntrypoint: '@astrojs/vue/server.js',\n\t};\n}\n\n/**\n * @deprecated Import `getContainerRenderer` from `@astrojs/vue/container-renderer` instead.\n */\nexport function getContainerRenderer(): AstroRenderer {\n\tconsole.warn(\n\t\t'[@astrojs/vue] Importing `getContainerRenderer` from `@astrojs/vue` is deprecated. Import it from `@astrojs/vue/container-renderer` instead.',\n\t);\n\treturn getContainerRendererImpl();\n}\n\nfunction virtualAppEntrypoint(options?: Options): Plugin {\n\tlet isBuild: boolean;\n\tlet root: string;\n\tlet appEntrypoint: string | undefined;\n\n\treturn {\n\t\tname: VIRTUAL_MODULE_ID,\n\t\tconfig(_, { command }) {\n\t\t\tisBuild = command === 'build';\n\t\t},\n\t\tconfigResolved(config) {\n\t\t\troot = config.root;\n\t\t\tif (options?.appEntrypoint) {","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/integrations/vue/src/index.ts#L14-L50","documentation":"@astrojs/vue exports a deprecated `getContainerRenderer()` from its package root (packages/integrations/vue/src/index.ts:32). Calling it logs this console.warn and then delegates to the real implementation from `@astrojs/vue/container-renderer`. It exists only for backwards compatibility: container rendering (MDX-style entrypoints used by Astro Container API / experimental static extraction) moved to a separate subpath export to keep the main entry lean. Functionally nothing breaks — you get the same renderer object — but the root export may be removed in a future major, and importing it also pulls the full Vue plugin entry into the container process.","triggerScenarios":"Executing code that imports `{ getContainerRenderer }` from '@astrojs/vue' (the package root) and calls it — typically an experimental container script (`src/content/config.ts`-adjacent `.ts` doing `const renderer = await getContainerRenderer()` combined with ` experimentalContainerMode ` or the Astro Container API in `astro.config`'s content layer, or a custom script using `experimental_AstroContainer`). The warning fires at call time via console.warn, once per call.","commonSituations":"Following pre-5.x (or early 5.x) Astro docs/blogs for the Container API that used the root import; upgrading @astrojs/vue to a version that split out `container-renderer` without updating the import path; copying container examples from another repo or an AI-generated snippet with the old specifier.","solutions":["Change the import specifier from '@astrojs/vue' to '@astrojs/vue/container-renderer' — everything else (name, signature, return) is identical.","Search the repo for `from '@astrojs/vue'` and fix any occurrence that imports `getContainerRenderer` specifically (other exports like the default `vue()` plugin still come from the root).","If a third-party integration/starter triggers it, update that dependency to a release importing from the subpath, or patch via package overrides."],"exampleFix":"// before\nimport { getContainerRenderer } from '@astrojs/vue';\n\n// after\nimport { getContainerRenderer } from '@astrojs/vue/container-renderer';","handlingStrategy":"validation","validationCode":"// ESLint: fail any deprecated root-level container renderer import\n// eslint.config.mjs\n{\n  rules: {\n    'no-restricted-imports': ['error', {\n      paths: [{\n        name: '@astrojs/vue',\n        importNames: ['getContainerRenderer'],\n        message: \"Import getContainerRenderer from '@astrojs/vue/container-renderer' instead.\",\n      }],\n    }],\n  },\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always import container-renderer helpers from their subpath (`@astrojs/<renderer>/container-renderer`) — the pattern applies to other renderer integrations too, not just Vue.","Grep for `getContainerRenderer` after upgrading renderer integrations; subpath exports get migrated silently and the root shim is eventually deleted.","Prefer the official Astro Container API docs over older blog examples when wiring container scripts, since import paths are the part most often changed across majors."],"tags":["vue","deprecation","container-api","import-path","astro-integration"],"backgroundTag":"deprecated-import-subpath-migration","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}