build(storybook): add @grafana-app/source to conditionNames

This commit is contained in:
Jack Westbrook 2025-09-29 10:03:58 +02:00
parent c13a2b6e8d
commit 3f724520f5
No known key found for this signature in database
GPG Key ID: 2E30ECF346D7D121
2 changed files with 12 additions and 2 deletions

View File

@ -95,6 +95,16 @@ const mainConfig: StorybookConfig = {
},
});
// Tell storybook to resolve imports with the @grafana-app/source condition for
// the packages in this repo.
if (config && config.resolve) {
if (Array.isArray(config.resolve.conditionNames)) {
config.resolve.conditionNames.unshift('@grafana-app/source');
} else {
config.resolve.conditionNames = ['@grafana-app/source', '...'];
}
}
return config;
},
};

View File

@ -1,8 +1,8 @@
{
"compilerOptions": {
"declarationDir": "dist",
"noUnusedLocals": false,
"outDir": "compiled"
"moduleResolution": "bundler",
"noUnusedLocals": false
},
"extends": "../tsconfig.json",
"include": ["../src/**/*.ts*", "../../../public/app/types/svg.d.ts"]