Skip to content

Commit

Permalink
🐛 fix build and installs
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath committed Apr 6, 2024
1 parent efa4b13 commit 8d3516f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
23 changes: 4 additions & 19 deletions .storybook/main.js
@@ -1,6 +1,4 @@
import path from 'path';
import { mergeConfig } from 'vite';
import turbosnap from 'vite-plugin-turbosnap';
/** @type { import('@storybook/web-components-vite').StorybookConfig } */
const config = {
stories: ['../src/github/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
Expand All @@ -10,31 +8,18 @@ const config = {
'@storybook/addon-links',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
'storybook-addon-mock',
// 'storybook-addon-mock',
'@chromaui/addon-visual-tests',
],
core: {
builder: '@storybook/builder-vite'
},
framework: {
name: '@storybook/web-components-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
async viteFinal(config, { configType }) {
// Ensures that the cache directory is inside the project directory
config.cacheDir = path.join(__dirname, '../node_modules/.vite');

return mergeConfig(config, {
plugins:
configType === "PRODUCTION"
? [
turbosnap({
// This should be the base path of your storybook. In monorepos, you may only need process.cwd().
rootDir: config.root ?? process.cwd(),
}),
]
: [],
});
},
};
export default config;
7 changes: 0 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -57,7 +57,6 @@
"jsdoc-to-markdown": "^8.0.1",
"storydocker-storybook": "^0.0.24",
"storydocker-utilities": "^0.0.18",
"vite-plugin-turbosnap": "^1.0.3",
"yaml": "^2.4.1"
}
}

0 comments on commit 8d3516f

Please sign in to comment.