Skip to content

Commit

Permalink
fix(css): spread lightningcss options (#14313)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre authored Sep 8, 2023
1 parent ab5c421 commit 80c6608
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2187,6 +2187,7 @@ async function compileLightningCSS(
: await (
await importLightningCSS()
).bundleAsync({
...config.css?.lightningcss,
filename,
resolver: {
read(filePath) {
Expand Down Expand Up @@ -2217,14 +2218,12 @@ async function compileLightningCSS(
return id
},
},
targets: config.css?.lightningcss?.targets,
minify: config.isProduction && !!config.build.cssMinify,
sourceMap: config.css?.devSourcemap,
analyzeDependencies: true,
cssModules: cssModuleRE.test(id)
? config.css?.lightningcss?.cssModules ?? true
: undefined,
drafts: config.css?.lightningcss?.drafts,
})

let css = res.code.toString()
Expand Down

0 comments on commit 80c6608

Please sign in to comment.