Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
build: run cssnano only in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
CanRau committed Nov 29, 2021
1 parent 8dc1af4 commit 1532093
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module.exports = {
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
cssnano: {
preset: 'default',
},
},
};

if (process.env.NODE_ENV === "production") {
config.plugins.cssnano = {
preset: 'default',
}
}

module.exports = config
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
mode: "jit",
purge: ["./app/**/*.tsx", "./app/**/*.jsx", "./app/**/*.js", "./app/**/*.ts"],
purge: ["./app/**/*.{ts,tsx}"],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
Expand Down

0 comments on commit 1532093

Please sign in to comment.