Skip to content

Commit

Permalink
Don't use cssnano in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Jan 4, 2024
1 parent cd0c6be commit 3e761db
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions frontend/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,11 @@ export const commonConfig = {
plugins: [
sassPlugin({
async transform(source, resolveDir, filePath) {
const { css } = await postcss([
tailwindcss,
autoprefixer,
postcssPresetEnv({ stage: 0 }),
cssnano({ preset: 'default' }),
]).process(source, { from: filePath })
const plugins = [tailwindcss, autoprefixer, postcssPresetEnv({ stage: 0 })]
if (!isDev) {
plugins.push(cssnano({ preset: 'default' }))
}
const { css } = await postcss(plugins).process(source, { from: filePath })
return css
},
}),
Expand Down

0 comments on commit 3e761db

Please sign in to comment.