Skip to content

Commit 7904b35

Browse files
mallory-scottonCopilot
andcommitted
fix: fixing tailwindcss implementation that was breaking the production website
Co-authored-by: Copilot <copilot@github.com>
1 parent 9cc3a7d commit 7904b35

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/css/custom.css

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@
44
* work well for content-centric websites.
55
*/
66

7-
/* 1. Define the layers */
8-
@layer theme, base, components, utilities;
9-
10-
/* 2. Import the Theme variables */
11-
@import 'tailwindcss/theme' layer(theme);
12-
13-
/* OMIT PREFLIGHT: Do not import "tailwindcss/preflight" */
14-
15-
/* 3. Import the Utilities (the actual Tailwind classes) */
16-
@import 'tailwindcss/utilities' layer(utilities);
7+
/* Import Tailwind without preflight */
8+
@import 'tailwindcss/theme';
9+
@import 'tailwindcss/utilities';
1710

1811
/* EDS Iconfont */
1912
@font-face {
@@ -1938,3 +1931,4 @@ mark,
19381931
list-style-type: disc;
19391932
margin-inline-start: 0.5rem;
19401933
}
1934+

src/plugins/tailwind-config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@ module.exports = function tailwindPlugin(context, options) {
22
return {
33
name: 'tailwind-plugin',
44
configurePostCss(postcssOptions) {
5-
postcssOptions.plugins = [require('@tailwindcss/postcss')];
5+
postcssOptions.plugins.push(require('@tailwindcss/postcss'));
66
return postcssOptions;
7+
},
8+
configureWebpack(config, isServer) {
9+
if (config.optimization && config.optimization.minimizer) {
10+
config.optimization.minimizer = config.optimization.minimizer.filter(
11+
(m) => m && m.constructor && m.constructor.name !== 'CssMinimizerPlugin'
12+
);
13+
}
14+
return {};
715
}
816
};
917
};

0 commit comments

Comments
 (0)