storybook/docs/_snippets/vitest-plugin-vitest-config-alias.md
2024-09-09 13:31:16 -06:00

552 B

import { mergeConfig } from 'vite';

export default {
  // ...
  viteFinal: async (viteConfig) => {
    return mergeConfig(viteConfig, {
      resolve: {
        alias: {
          '@components': '/src/components',
          // ...
        },
      },
    });
  },
};
export default defineConfig({
  // ...
  resolve: {
    alias: {
      '@components': '/src/components',
      // ...
    },
  },
});