Skip to content

Commit

Permalink
fix(css): fix sourcemap warning in build with lightningCSS (#14871)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre authored Nov 5, 2023
1 parent ac2503d commit 11b1796
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,10 @@ async function compileLightningCSS(
},
},
minify: config.isProduction && !!config.build.cssMinify,
sourceMap: config.css?.devSourcemap,
sourceMap:
config.command === 'build'
? !!config.build.sourcemap
: config.css?.devSourcemap,
analyzeDependencies: true,
cssModules: cssModuleRE.test(id)
? config.css?.lightningcss?.cssModules ?? true
Expand Down

0 comments on commit 11b1796

Please sign in to comment.