@bunup/plugin-tailwindcss 0.14.6 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -82,11 +82,12 @@ function extractPrefix(source) {
|
|
|
82
82
|
function preprocessSource(source, preflight) {
|
|
83
83
|
const prefix = extractPrefix(source);
|
|
84
84
|
const removedTailwindImports = source.replace(TAILWIND_IMPORT_RE, "");
|
|
85
|
+
const importEnd = prefix ? ` prefix(${prefix});` : ";";
|
|
85
86
|
return `
|
|
86
87
|
@layer theme, base, components, utilities;
|
|
87
|
-
@import "tailwindcss/theme.css" layer(theme)${
|
|
88
|
-
${preflight ? `@import "tailwindcss/preflight.css" layer(base)${
|
|
89
|
-
@import "tailwindcss/utilities.css" layer(utilities)${
|
|
88
|
+
@import "tailwindcss/theme.css" layer(theme)${importEnd};
|
|
89
|
+
${preflight ? `@import "tailwindcss/preflight.css" layer(base)${importEnd};` : ""}
|
|
90
|
+
@import "tailwindcss/utilities.css" layer(utilities)${importEnd};
|
|
90
91
|
@source not inline("{contents,filter,transform}");
|
|
91
92
|
${removedTailwindImports}
|
|
92
93
|
`.trim();
|