Skip to content

Commit

Permalink
Merge pull request #24804 from storybookjs/norbert/testbuild-no-sourc…
Browse files Browse the repository at this point in the history
…emaps

TestBuild: No sourcemaps for test builds
  • Loading branch information
ndelangen authored Nov 10, 2023
2 parents 4f6ac8d + e347ebf commit 176017d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/builders/builder-vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function build(options: Options) {
build: {
outDir: options.outputDir,
emptyOutDir: false, // do not clean before running Vite build - Storybook has already added assets in there!
sourcemap: true,
sourcemap: !options.test,
rollupOptions: {
// Do not try to bundle the storybook runtime, it is copied into the output dir after the build.
external: ['./sb-preview/runtime.js'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default async (
name: 'preview',
mode: isProd ? 'production' : 'development',
bail: isProd,
devtool: 'cheap-module-source-map',
devtool: options.test ? false : 'cheap-module-source-map',
entry: entries,
output: {
path: resolve(process.cwd(), outputDir),
Expand Down

0 comments on commit 176017d

Please sign in to comment.