mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 11:53:24 +03:00
22 lines
593 B
TypeScript
22 lines
593 B
TypeScript
import type { StorybookConfig } from '@storybook/react-vite';
|
|
import { mergeConfig } from 'vite';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const config: Pick<StorybookConfig, 'viteFinal'> = {
|
|
async viteFinal(config, { configType }) {
|
|
return mergeConfig(config, {
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(fileURLToPath(new URL('../src', import.meta.url))),
|
|
'@affine/i18n': path.resolve(
|
|
fileURLToPath(new URL('../../i18n/src', import.meta.url))
|
|
),
|
|
},
|
|
},
|
|
});
|
|
},
|
|
};
|
|
|
|
export default config;
|