Skip to content

Commit

Permalink
chore: updated vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
benjitrosch committed Apr 14, 2023
1 parent 3d1860d commit 45f835e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .storybook/preview.tsx
Expand Up @@ -61,15 +61,15 @@ const preview: Preview = {
title={options.title}
description={options.name}
source={
options.parameters.docs.source.originalSource.
options.parameters.docs.source.originalSource
/* TODO: clean up all this string formatting/regex */
/* Removes the args arrow function */
replace(/^args\s*=>\s*\{\s*/, ' ').
replace(/\(.*args.*\)\s*=>\s*\{\s*\n/, ' ').
replace(/^(\s*)return\s+/, '$1').
replace(/_s\(\);/, '').
.replace(/^args\s*=>\s*\{\s*/, ' ')
.replace(/\(.*args.*\)\s*=>\s*\{\s*\n/, ' ')
.replace(/^(\s*)return\s+/, '$1')
.replace(/_s\(\);/, '')
/* Removes the last occurence of a closing bracket (from the lambda) */
replace(/}([^}]*)$/, '$1')
.replace(/}([^}]*)$/, '$1')
/* Removes the last occurence of a semicolon */
.replace(/;(?=[^;]*$)/, '')
}
Expand Down
4 changes: 0 additions & 4 deletions vite.config.ts
Expand Up @@ -4,8 +4,4 @@ import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
build: {
outDir: "docs",
},
base: "",
})

0 comments on commit 45f835e

Please sign in to comment.