Skip to content

Commit

Permalink
Fix broken storybook build
Browse files Browse the repository at this point in the history
* @rollup/plugin-commonjs was added before to fix cjs files build
* remove @rollup/plugin-commonjs removed to fix `storybook build`
* see storybookjs/storybook#3346 (comment)
  • Loading branch information
iva2k committed Nov 30, 2024
1 parent ca54079 commit 5b2f4e6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { PluginOption, UserConfig, Plugin as VitePlugin } from 'vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
// import basicSsl from '@vitejs/plugin-basic-ssl';
import replace from '@rollup/plugin-replace';
import rollupCommonjs from '@rollup/plugin-commonjs';
import backloopHttpsOptions from 'backloop.dev';

import Icons from 'unplugin-icons/vite';
Expand All @@ -23,7 +22,6 @@ export default defineConfig(async ({ mode }) => {

const plugins: PluginOption[] = [
// see below: basicSsl(),
rollupCommonjs() as VitePlugin,
sveltekit(),
SvelteKitPWA(pwaConfiguration),
Icons({
Expand Down Expand Up @@ -61,12 +59,7 @@ export default defineConfig(async ({ mode }) => {
logLevel: 'info',
build: {
minify: !PROD_DEBUG,
sourcemap: PROD_DEBUG,
commonjsOptions: {
// Options for rollupCommonjs
include: [], // https://github.com/vitejs/vite/issues/2679#issuecomment-994772493
requireReturnsDefault: 'auto'
}
sourcemap: PROD_DEBUG
},
define: {
__DATE__: JSON.stringify(new Date().toISOString()),
Expand Down

0 comments on commit 5b2f4e6

Please sign in to comment.