.storybook/main.ts: webpack core's auto-DefinePlugin (from optimization.nodeEnv) and Storybook's own preset both define process.env.NODE_ENV on the same compile, triggering a "Conflicting values" warning even though both resolve to "development" locally. Disable the redundant one via webpackFinal. ci.yml: revert the storybook-a11y container's memory cap 6g -> 4g. The 6g bump was based on an unconstrained local RSS measurement (~5.8GB) that doesn't reflect real behavior under a cgroup cap. Verified directly: running this job's exact steps (npm ci, playwright install, build-storybook, test-storybook:ci) in `docker run --cpus=2 --memory=4g --memory-swap=4g node:24-bookworm` completes clean, no OOM, 62/62 suites passing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
29 lines
1.2 KiB
TypeScript
29 lines
1.2 KiB
TypeScript
import type { StorybookConfig } from '@storybook/angular';
|
|
import remarkGfm from 'remark-gfm';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
addons: [
|
|
'@storybook/addon-a11y',
|
|
// remark-gfm so GFM pipe tables in *.mdx docs actually render (addon-docs
|
|
// doesn't parse them without it).
|
|
{
|
|
name: '@storybook/addon-docs',
|
|
options: { mdxPluginOptions: { mdxCompileOptions: { remarkPlugins: [remarkGfm] } } },
|
|
},
|
|
'@storybook/addon-onboarding',
|
|
],
|
|
framework: '@storybook/angular',
|
|
// Serve the vendored CIBG package so preview-head.html can <link> its CSS (and its
|
|
// relative font/icon/image url()s resolve) — mirrors index.html for the real app.
|
|
staticDirs: ['../public'],
|
|
// Webpack's own auto-DefinePlugin (from `optimization.nodeEnv`) and Storybook's preset both
|
|
// define `process.env.NODE_ENV` on the same compile, which webpack warns about as
|
|
// "Conflicting values" even though they resolve to the same string. Disable the redundant one.
|
|
webpackFinal: async (config) => {
|
|
config.optimization = { ...config.optimization, nodeEnv: false };
|
|
return config;
|
|
},
|
|
};
|
|
export default config;
|