Fix storybook
This commit is contained in:
		
					parent
					
						
							
								fddc8a1209
							
						
					
				
			
			
				commit
				
					
						d6fb0e836d
					
				
			
		
					 4 changed files with 38 additions and 803 deletions
				
			
		| 
						 | 
				
			
			@ -1,13 +1,20 @@
 | 
			
		|||
const svgrPlugin = require("vite-plugin-svgr");
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
 | 
			
		||||
  addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
 | 
			
		||||
  stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
 | 
			
		||||
  framework: "@storybook/react",
 | 
			
		||||
  core: {
 | 
			
		||||
    builder: "storybook-builder-vite",
 | 
			
		||||
  },
 | 
			
		||||
  async viteFinal(config) {
 | 
			
		||||
    config.plugins = config.plugins.filter(
 | 
			
		||||
      (item) =>
 | 
			
		||||
        !(
 | 
			
		||||
          Array.isArray(item) &&
 | 
			
		||||
          item.length > 0 &&
 | 
			
		||||
          item[0].name === "vite-plugin-mdx"
 | 
			
		||||
        )
 | 
			
		||||
    );
 | 
			
		||||
    config.plugins.push(svgrPlugin());
 | 
			
		||||
    return config;
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue