ci: Fix CI issues after rspack migration
This commit is contained in:
16 files changed
+375
-122
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import path from 'path';
|
||||
import { pluginBabel } from '@rsbuild/plugin-babel';
|
||||
import type { StorybookConfig } from 'storybook-react-rsbuild';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
@@ -22,8 +23,28 @@ const config: StorybookConfig = {
|
||||
'@ermnvldmr/stl': path.resolve(__dirname, '../../../packages/stl/src'),
|
||||
'@ermnvldmr/ui': path.resolve(__dirname, '../../../packages/ui/src'),
|
||||
};
|
||||
|
||||
// Add Babel plugin with istanbul for coverage
|
||||
config.plugins = config.plugins || [];
|
||||
config.plugins.push(
|
||||
pluginBabel({
|
||||
include: /\.(?:jsx|tsx)$/,
|
||||
exclude: /[\\/]node_modules[\\/]/,
|
||||
babelLoaderOptions: (opts) => {
|
||||
opts.plugins = opts.plugins || [];
|
||||
opts.plugins.push([
|
||||
'babel-plugin-istanbul',
|
||||
{
|
||||
exclude: ['**/*.stories.tsx', '**/*.test.tsx', 'node_modules/**'],
|
||||
extension: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
]);
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
export default config;
|
||||
@@ -35,6 +35,7 @@
|
||||
"@ermnvldmr/rsbuild-config": "workspace:*",
|
||||
"@ermnvldmr/storybook-config": "workspace:*",
|
||||
"@rsbuild/core": "^1.2.11",
|
||||
"@rsbuild/plugin-babel": "^1.1.0",
|
||||
"@rsbuild/plugin-mdx": "^1.1.1",
|
||||
"@storybook/addon-a11y": "^8.6.15",
|
||||
"@storybook/addon-coverage": "^3.0.0",
|
||||
@@ -53,6 +54,7 @@
|
||||
"@types/react-dom": "^19.1.2",
|
||||
"@types/suncalc": "^1.9.2",
|
||||
"@vitest/coverage-v8": "^4.0.18",
|
||||
"babel-plugin-istanbul": "^7.0.1",
|
||||
"concurrently": "^9.1.2",
|
||||
"eslint": "^9.25.1",
|
||||
"http-server": "^14.1.1",
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Container,
|
||||
Text,
|
||||
} from '@ermnvldmr/ui';
|
||||
import React from 'react';
|
||||
|
||||
import { ArticleLayout } from './ArticleLayout';
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Welcome } from './Welcome';
|
||||
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
Reference in new issue
Block a user