diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-09-29 19:17:13 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-01 07:51:11 +0200 |
| commit | 4c41e477e13d37e187c8de4225c7e8056bd9ed28 (patch) | |
| tree | 33a7b51a0ed2c2ae207fc8f89f1454ccb77596a5 /config/postcss.config.js | |
| parent | 4720b07e9f18915cf1f6466245a92dedd11fdc55 (diff) | |
Internalise theme
Diffstat (limited to 'config/postcss.config.js')
| -rw-r--r-- | config/postcss.config.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/config/postcss.config.js b/config/postcss.config.js new file mode 100644 index 0000000..ee0749c --- /dev/null +++ b/config/postcss.config.js @@ -0,0 +1,21 @@ +const themeDir = __dirname + "/../"; + +const cssnanoPlugin = require("cssnano")({ + path: [themeDir], + preset: [ + "default", + { + discardComments: { + removeAll: true, + }, + }, + ], +}); + +module.exports = { + plugins: [ + require("tailwindcss")(themeDir + "./config/tailwind.config.js"), + require("autoprefixer")({ path: [themeDir] }), + ...(process.env.HUGO_ENVIRONMENT === "production" ? [cssnanoPlugin] : []), + ], +}; |
