Bugfix storybook now works with live API data or with built tests

This commit is contained in:
2026-06-17 16:06:53 -07:00
parent f944c3aac6
commit 345152b548
5 changed files with 50 additions and 16 deletions
+20 -3
View File
@@ -1,6 +1,6 @@
/** @type { import('@storybook/react-vite').StorybookConfig } */
import { mergeConfig } from 'vite';
const config = {
"stories": [
"../src/**/*.mdx",
@@ -12,6 +12,23 @@ const config = {
"@storybook/addon-a11y",
"@storybook/addon-docs"
],
"framework": "@storybook/react-vite"
"framework": "@storybook/react-vite",
// --- ADDED THE PROXY INJECTION HERE ---
async viteFinal(config) {
return mergeConfig(config, {
server: {
proxy: {
'/api': {
target: 'http://vdap.org:8082',
changeOrigin: true,
secure: false,
},
},
},
});
},
// --------------------------------------
};
export default config;