optionsPlugin() — astro Function Reference
Architecture documentation for the optionsPlugin() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 4b180446_06b5_5487_3d71_322adb03b9ff["optionsPlugin()"] eecbb2c4_1cf9_b32b_f41f_438a6587b783["index.ts"] 4b180446_06b5_5487_3d71_322adb03b9ff -->|defined in| eecbb2c4_1cf9_b32b_f41f_438a6587b783 3505419d_39da_09ce_a027_e46d2f0fcbb5["getViteConfiguration()"] 3505419d_39da_09ce_a027_e46d2f0fcbb5 -->|calls| 4b180446_06b5_5487_3d71_322adb03b9ff style 4b180446_06b5_5487_3d71_322adb03b9ff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/react/src/index.ts lines 33–66
function optionsPlugin({
experimentalReactChildren = false,
experimentalDisableStreaming = false,
}: {
experimentalReactChildren: boolean;
experimentalDisableStreaming: boolean;
}): vite.Plugin {
const virtualModule = 'astro:react:opts';
const virtualModuleId = '\0' + virtualModule;
return {
name: '@astrojs/react:opts',
resolveId: {
filter: {
id: new RegExp(`^${virtualModule}$`),
},
handler() {
return virtualModuleId;
},
},
load: {
filter: {
id: new RegExp(`^${virtualModuleId}$`),
},
handler() {
return {
code: `export default {
experimentalReactChildren: ${JSON.stringify(experimentalReactChildren)},
experimentalDisableStreaming: ${JSON.stringify(experimentalDisableStreaming)}
}`,
};
},
},
};
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does optionsPlugin() do?
optionsPlugin() is a function in the astro codebase, defined in packages/integrations/react/src/index.ts.
Where is optionsPlugin() defined?
optionsPlugin() is defined in packages/integrations/react/src/index.ts at line 33.
What calls optionsPlugin()?
optionsPlugin() is called by 1 function(s): getViteConfiguration.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free