weapp-tailwindcss 5.1.4 → 5.1.5

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.
Files changed (53) hide show
  1. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +8 -2
  2. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +5 -1
  3. package/dist/bundlers/vite/generate-bundle/tailwind-v4-css-source.d.ts +6 -3
  4. package/dist/bundlers/vite/hot-css-modules.d.ts +1 -0
  5. package/dist/bundlers/vite/source-scan/css-entries.d.ts +1 -0
  6. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +2 -1
  7. package/dist/cli.js +18 -3
  8. package/dist/cli.mjs +16 -1
  9. package/dist/{context-DCVMkTRj.js → context-BziwyWy1.js} +21 -6
  10. package/dist/{context-Bkpmt3ja.mjs → context-rrYZuUBU.mjs} +18 -3
  11. package/dist/core.js +1 -1
  12. package/dist/core.mjs +1 -1
  13. package/dist/css-macro/index.d.ts +2 -1
  14. package/dist/{defaults-BhE26nSw.mjs → defaults-9B6aMyZb.mjs} +2 -2
  15. package/dist/{defaults-DQhgnnn-.js → defaults-nsf4VNMX.js} +2 -2
  16. package/dist/defaults.d.ts +1 -1
  17. package/dist/defaults.js +1 -1
  18. package/dist/defaults.mjs +1 -1
  19. package/dist/{gulp-Bogfnoki.js → gulp-CuVsZdO9.js} +3 -3
  20. package/dist/{gulp-0RsqkF_d.mjs → gulp-ygWfmOqh.mjs} +3 -3
  21. package/dist/gulp.js +1 -1
  22. package/dist/gulp.mjs +1 -1
  23. package/dist/{hmr-timing-BV6nFPoT.js → hmr-timing-BKdCeIrn.js} +207 -67
  24. package/dist/{hmr-timing-BRNaz8Od.mjs → hmr-timing-Dh_nn3w5.mjs} +207 -67
  25. package/dist/index.js +3 -3
  26. package/dist/index.mjs +3 -3
  27. package/dist/js/js-string-escape.d.ts +1 -0
  28. package/dist/presets.js +1 -1
  29. package/dist/presets.mjs +1 -1
  30. package/dist/rspack.js +1 -1
  31. package/dist/rspack.mjs +1 -1
  32. package/dist/{source-candidate-scan-signature-BB1hvW68.mjs → source-candidate-scan-signature-DATRnS1X.mjs} +157 -6
  33. package/dist/{source-candidate-scan-signature-CaDT0gkj.js → source-candidate-scan-signature-DIj9m4wB.js} +168 -5
  34. package/dist/style-injector/internal.d.ts +7 -0
  35. package/dist/style-injector/options.d.ts +25 -0
  36. package/dist/tailwindcss/v4/preflight.d.ts +4 -0
  37. package/dist/{tailwindcss-D2xs4OEu.js → tailwindcss-BwoNQ3t8.js} +52 -12
  38. package/dist/{tailwindcss-D0JF0fuZ.mjs → tailwindcss-C-uM4rB8.mjs} +47 -13
  39. package/dist/{transform-BP86eSZp.mjs → transform-DHLemtaX.mjs} +1 -1
  40. package/dist/{transform-CXCQ28Tc.js → transform-KLD1tJdb.js} +1 -1
  41. package/dist/typedoc.export.d.ts +1 -0
  42. package/dist/types/index.d.ts +2 -1
  43. package/dist/types/user-defined-options/general.d.ts +2 -0
  44. package/dist/{vite-BYgT1ir9.js → vite-Yp14HNyS.js} +101 -37
  45. package/dist/{vite-B1SlBmqO.mjs → vite-cH0tTMHc.mjs} +101 -37
  46. package/dist/vite.js +1 -1
  47. package/dist/vite.mjs +1 -1
  48. package/dist/weapp-tw-css-import-rewrite-loader.js +276 -83
  49. package/dist/{webpack-Bg6pefpb.mjs → webpack-DBhmJ-_P.mjs} +62 -18
  50. package/dist/{webpack-khSwkXP5.js → webpack-DN3tgLbF.js} +61 -17
  51. package/dist/webpack.js +1 -1
  52. package/dist/webpack.mjs +1 -1
  53. package/package.json +16 -5
@@ -1,7 +1,7 @@
1
1
  import { A as resolveCssEntrySource, B as stripTailwindBanner, C as hasTailwindRootDirectives, E as normalizeTailwindSourceDirectives, F as hasTailwindGeneratedCssMarkers, H as normalizeConfigDirective, I as splitGeneratorPlaceholderCssBySourceOrder, J as FULL_SOURCE_SCAN_EXTENSION_RE, L as splitTailwindGeneratedCssByBanner, M as VITE_MARKER_RE, N as createCssAppend, O as parseImportRequest, P as hasTailwindGeneratedCss, Q as isFileMatchedByTailwindSourceEntries, R as splitTailwindV4GeneratedCssBySourceOrder, U as prependConfigDirective, V as stripTailwindBanners, ct as omitUndefined, i as resolveTailwindV4SourceOptionsFromRuntime, it as toPosixPath$1, j as GENERATOR_PLACEHOLDER_MARKER_RE, k as removeTailwindSourceDirectives, n as resolveTailwindV4SourceFromRuntime, nt as resolveSourceScanPath, rt as resolveTailwindV4CssSourceBase, st as filterUnsupportedMiniProgramTailwindV4Candidates, t as resolveTailwindV4Source$1, ut as loadTailwindV4DesignSystem, w as hasTailwindSourceDirectives, x as hasTailwindApplyDirective, z as stripGeneratorPlaceholderMarkers } from "./v4-engine-BuuYDXt1.mjs";
2
2
  import { a as resolveGeneratorRuntimeBranch, i as normalizeWeappTailwindcssGeneratorOptions, s as shouldUseMiniProgramCssBranch, t as createWeappTailwindcssGenerator } from "./generator-24-HgU9F.mjs";
3
- import { S as createDebug, g as traverse, h as babelParse, m as replaceWxml, r as resolveStyleOptionsFromContext, w as md5Hash } from "./context-Bkpmt3ja.mjs";
4
- import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled } from "./tailwindcss-D0JF0fuZ.mjs";
3
+ import { S as createDebug, g as traverse, h as babelParse, m as replaceWxml, r as resolveStyleOptionsFromContext, w as md5Hash } from "./context-rrYZuUBU.mjs";
4
+ import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective } from "./tailwindcss-C-uM4rB8.mjs";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  import process from "node:process";
@@ -152,24 +152,91 @@ function collectGeneratedRawSourceCandidates(candidates, rawSource, escapeMap) {
152
152
  return matched;
153
153
  }
154
154
  //#endregion
155
+ //#region src/bundlers/shared/generator-css/source-resolver/postcss-source.ts
156
+ function resolvePostcssFromOption(cssHandlerOptions) {
157
+ const from = cssHandlerOptions.postcssOptions?.options?.from;
158
+ return typeof from === "string" && from.length > 0 ? from : void 0;
159
+ }
160
+ function resolvePostcssSourceFile(cssHandlerOptions) {
161
+ const from = resolvePostcssFromOption(cssHandlerOptions);
162
+ if (!from || !path.isAbsolute(from)) return;
163
+ return from.replace(/[?#].*$/, "");
164
+ }
165
+ function resolveCssHandlerSourceOptions(cssHandlerOptions) {
166
+ return cssHandlerOptions.sourceOptions;
167
+ }
168
+ function resolveCssSourceBase(file, cssHandlerOptions) {
169
+ const normalized = (resolvePostcssFromOption(cssHandlerOptions) ?? file).replace(/[?#].*$/, "");
170
+ return path.dirname(path.resolve(normalized));
171
+ }
172
+ //#endregion
155
173
  //#region src/bundlers/shared/generator-css/generation-helpers.ts
174
+ function isVueScopedStyleSource(from) {
175
+ if (typeof from !== "string" || from.length === 0) return false;
176
+ const queryIndex = from.indexOf("?");
177
+ if (queryIndex === -1) return false;
178
+ const query = from.slice(queryIndex + 1);
179
+ return /(?:^|&)type=style(?:&|$)/.test(query) && /(?:^|&)scoped(?:=(?:true|1))?(?:&|$)/.test(query);
180
+ }
156
181
  function hasMiniProgramTailwindV4PreflightReset(css) {
157
182
  return /(?:^|[},])\s*view\s*,\s*text\s*,\s*::after\s*,\s*::before\s*\{[^}]*\bborder\s*:\s*0\s+solid\b/.test(css);
158
183
  }
159
184
  function finalizeMiniProgramGeneratorCss(css, target, _majorVersion, cssPreflight, options = {}) {
160
185
  if (target !== "weapp") return css;
161
- const injectPreflight = options.injectPreflight !== false && !hasMiniProgramTailwindV4PreflightReset(css);
186
+ if (isVueScopedStyleSource(options.styleOptions?.postcssOptions?.options?.from)) return finalizeMiniProgramCss(css, {
187
+ cssPreflight: false,
188
+ cssSelectorReplacement: options.styleOptions?.cssOptions?.cssSelectorReplacement ?? options.styleOptions?.cssSelectorReplacement,
189
+ isTailwindcssV4: true,
190
+ tailwindcssV4GradientFallback: options.styleOptions?.cssOptions?.tailwindcssV4GradientFallback ?? options.styleOptions?.tailwindcssV4GradientFallback
191
+ });
192
+ const hasPreflightReset = hasMiniProgramTailwindV4PreflightReset(css);
193
+ const injectPreflight = options.injectPreflight !== false && !hasPreflightReset;
194
+ const preservePreflight = options.preservePreflight !== false;
162
195
  return finalizeMiniProgramCss(css, {
163
- cssPreflight: cssPreflight === false ? false : injectPreflight ? cssPreflight : void 0,
196
+ cssPreflight: cssPreflight === false || options.injectPreflight === false && (!hasPreflightReset || !preservePreflight) ? false : injectPreflight ? cssPreflight : hasPreflightReset && preservePreflight ? cssPreflight : void 0,
164
197
  cssSelectorReplacement: options.styleOptions?.cssOptions?.cssSelectorReplacement ?? options.styleOptions?.cssSelectorReplacement,
165
198
  isTailwindcssV4: true,
166
199
  tailwindcssV4GradientFallback: options.styleOptions?.cssOptions?.tailwindcssV4GradientFallback ?? options.styleOptions?.tailwindcssV4GradientFallback
167
200
  });
168
201
  }
169
- function shouldInjectMiniProgramPreflightForGeneratorCss(opts, options) {
170
- if (options.cssHandlerOptions.uniAppX === true && options.cssHandlerOptions.uniAppXCssTarget === "uvue") return false;
171
- if (!options.isolateCurrentCssCandidates) return true;
172
- return isUniAppXEnabled(opts.uniAppX) && Boolean(options.localImports?.trim());
202
+ function resolveMiniProgramPreflightModeForGeneratorCss(opts, options) {
203
+ if (isVueScopedStyleSource(resolvePostcssFromOption(options.cssHandlerOptions))) return {
204
+ inject: false,
205
+ preserve: false
206
+ };
207
+ if (options.cssHandlerOptions.uniAppX === true && options.cssHandlerOptions.uniAppXCssTarget === "uvue") return {
208
+ inject: false,
209
+ preserve: false
210
+ };
211
+ const shouldInjectUniAppXLocalImportPreflight = isUniAppXEnabled(opts.uniAppX) && Boolean(options.localImports?.trim());
212
+ if (opts.cssPreflight === false) return {
213
+ inject: false,
214
+ preserve: false
215
+ };
216
+ if (options.primaryCssSource) return {
217
+ inject: true,
218
+ preserve: true
219
+ };
220
+ if (options.explicitCssSource) return {
221
+ inject: false,
222
+ preserve: true
223
+ };
224
+ if (options.cssHandlerOptions.isMainChunk) return {
225
+ inject: true,
226
+ preserve: true
227
+ };
228
+ if (!options.cssHandlerOptions.isMainChunk && !options.primaryCssSource && !options.explicitCssSource) return {
229
+ inject: shouldInjectUniAppXLocalImportPreflight,
230
+ preserve: shouldInjectUniAppXLocalImportPreflight
231
+ };
232
+ if (!options.isolateCurrentCssCandidates) return {
233
+ inject: true,
234
+ preserve: true
235
+ };
236
+ return {
237
+ inject: shouldInjectUniAppXLocalImportPreflight,
238
+ preserve: shouldInjectUniAppXLocalImportPreflight
239
+ };
173
240
  }
174
241
  function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtime, options) {
175
242
  if (options.isolateCssSource) {
@@ -203,9 +270,10 @@ function isEmptyCssSourceOrderParts(parts) {
203
270
  }
204
271
  function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOptions) {
205
272
  const resolvedStyleOptions = resolveStyleOptionsFromContext(opts);
273
+ const scopedVueStyleSource = isVueScopedStyleSource(resolvePostcssFromOption(cssHandlerOptions));
206
274
  const preflightStyleOptions = {
207
- cssPreflight: resolvedStyleOptions.cssPreflight,
208
- cssPreflightRange: resolvedStyleOptions.cssPreflightRange
275
+ cssPreflight: scopedVueStyleSource ? false : resolvedStyleOptions.cssPreflight,
276
+ cssPreflightRange: scopedVueStyleSource ? void 0 : resolvedStyleOptions.cssPreflightRange
209
277
  };
210
278
  return {
211
279
  ...resolvedStyleOptions,
@@ -826,8 +894,9 @@ function withGeneratorSourceMetadata(source, metadata) {
826
894
  __weappTailwindcssMeta: metadata
827
895
  };
828
896
  }
829
- function withMatchedSourceSideMetadata(source, resolvedEntrySource) {
897
+ function withMatchedSourceSideMetadata(source, resolvedEntrySource, metadata = {}) {
830
898
  return resolvedEntrySource.file ? withGeneratorSourceMetadata(source, {
899
+ ...metadata,
831
900
  isolateCssSource: true,
832
901
  matchedCssSourceFile: resolvedEntrySource.file,
833
902
  sourceBase: resolvedEntrySource.base,
@@ -835,24 +904,6 @@ function withMatchedSourceSideMetadata(source, resolvedEntrySource) {
835
904
  }) : source;
836
905
  }
837
906
  //#endregion
838
- //#region src/bundlers/shared/generator-css/source-resolver/postcss-source.ts
839
- function resolvePostcssFromOption(cssHandlerOptions) {
840
- const from = cssHandlerOptions.postcssOptions?.options?.from;
841
- return typeof from === "string" && from.length > 0 ? from : void 0;
842
- }
843
- function resolvePostcssSourceFile(cssHandlerOptions) {
844
- const from = resolvePostcssFromOption(cssHandlerOptions);
845
- if (!from || !path.isAbsolute(from)) return;
846
- return from.replace(/[?#].*$/, "");
847
- }
848
- function resolveCssHandlerSourceOptions(cssHandlerOptions) {
849
- return cssHandlerOptions.sourceOptions;
850
- }
851
- function resolveCssSourceBase(file, cssHandlerOptions) {
852
- const normalized = (resolvePostcssFromOption(cssHandlerOptions) ?? file).replace(/[?#].*$/, "");
853
- return path.dirname(path.resolve(normalized));
854
- }
855
- //#endregion
856
907
  //#region src/bundlers/shared/generator-css/source-resolver.ts
857
908
  function createCssEntrySources(cssEntries) {
858
909
  return cssEntries?.filter((entry) => typeof entry === "string" && entry.length > 0 && path.isAbsolute(entry)).map((entry) => ({ file: path.resolve(entry) }));
@@ -886,11 +937,15 @@ function createSingleTailwindV4SourceOptions(sourceOptions, options) {
886
937
  cssEntries: options.cssEntries
887
938
  });
888
939
  }
889
- async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions) {
940
+ async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions, options = {}) {
890
941
  const { cssEntries: _cssEntries, cssSources: _cssSources, ...singleEntrySourceOptions } = sourceOptions;
891
- if (!existsSync(cssEntry)) return resolveTailwindV4Source$1({
942
+ if (!existsSync(cssEntry)) return withGeneratorSourceMetadata(await resolveTailwindV4Source$1({
892
943
  ...omitUndefined(singleEntrySourceOptions),
893
944
  cssEntries: [cssEntry]
945
+ }), {
946
+ cssEntryIndex: options.index,
947
+ includesPreflight: options.includesPreflight,
948
+ primaryCssSource: options.index === 0
894
949
  });
895
950
  const css = readFileSync(cssEntry, "utf8");
896
951
  const base = path.dirname(path.resolve(cssEntry));
@@ -905,7 +960,10 @@ async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions) {
905
960
  css: normalizeConfigDirective(css, config),
906
961
  cssEntries: [cssEntry]
907
962
  }), {
963
+ cssEntryIndex: options.index,
964
+ includesPreflight: options.includesPreflight,
908
965
  matchedCssSourceFile: cssEntry,
966
+ primaryCssSource: options.index === 0,
909
967
  sourceBase: base,
910
968
  sourceCss: css
911
969
  });
@@ -918,12 +976,15 @@ function canResolveSourceSideCssEntry(file, cssHandlerOptions, sourceOptions) {
918
976
  function shouldResolveSourceSideCssEntry(rawSource) {
919
977
  return rawSource.includes("@apply") || hasTailwindRootDirectives(rawSource, { importFallback: true }) || hasTailwindSourceDirectives(rawSource, { importFallback: true }) || hasTailwindGeneratedCss(rawSource) || hasTailwindGeneratedCssMarkers(rawSource);
920
978
  }
921
- function resolveMatchingTailwindV4CssEntry(rawSource, file, sourceOptions) {
979
+ async function resolveMatchingTailwindV4CssEntry(rawSource, file, sourceOptions) {
922
980
  const cssEntries = sourceOptions.cssEntries;
923
981
  if (!cssEntries?.length) return;
924
982
  const normalizedFile = path.resolve(file.replace(/[?#].*$/, ""));
925
983
  const pathMatchedEntries = cssEntries.filter((cssEntry) => path.resolve(cssEntry.replace(/[?#].*$/, "")) === normalizedFile);
926
- if (pathMatchedEntries.length === 1) return resolveTailwindV4CssEntrySource(pathMatchedEntries[0], sourceOptions);
984
+ if (pathMatchedEntries.length === 1) return resolveTailwindV4CssEntrySource(pathMatchedEntries[0], sourceOptions, {
985
+ includesPreflight: await resolveTailwindV4CssEntryIncludesPreflight(pathMatchedEntries[0]),
986
+ index: cssEntries.indexOf(pathMatchedEntries[0])
987
+ });
927
988
  const normalizedRawSource = normalizeCssSourceForCompare(rawSource);
928
989
  const matches = cssEntries.map((cssEntry) => {
929
990
  if (!existsSync(cssEntry)) return;
@@ -942,7 +1003,10 @@ function resolveMatchingTailwindV4CssEntry(rawSource, file, sourceOptions) {
942
1003
  const bestScore = matches[0]?.score;
943
1004
  const matchingEntry = bestScore && matches.filter((match) => match.score === bestScore).length === 1 ? matches[0]?.cssEntry : void 0;
944
1005
  if (!matchingEntry) return;
945
- return resolveTailwindV4CssEntrySource(matchingEntry, sourceOptions);
1006
+ return resolveTailwindV4CssEntrySource(matchingEntry, sourceOptions, {
1007
+ includesPreflight: await resolveTailwindV4CssEntryIncludesPreflight(matchingEntry),
1008
+ index: cssEntries.indexOf(matchingEntry)
1009
+ });
946
1010
  }
947
1011
  function normalizeTailwindV4CssSourceConfig(cssSource, sourceBase) {
948
1012
  if (typeof cssSource.css !== "string" || cssSource.css.length === 0 || !cssSource.css.includes("@config")) return cssSource;
@@ -992,7 +1056,7 @@ function normalizeTailwindV4CssSourceConfigs(sourceOptions) {
992
1056
  cssSources
993
1057
  } : sourceOptions;
994
1058
  }
995
- async function resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, sourceOptions) {
1059
+ async function resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, sourceOptions, selectionOptions) {
996
1060
  const cssSources = sourceOptions.cssSources;
997
1061
  if (!cssSources?.length) return;
998
1062
  const normalizedRawSource = normalizeCssSourceForCompare(rawSource);
@@ -1013,7 +1077,12 @@ async function resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOpt
1013
1077
  const bestScore = matches[0]?.score;
1014
1078
  const matchingSource = bestScore && matches.filter((match) => match.score === bestScore).length === 1 ? matches[0]?.cssSource : void 0;
1015
1079
  if (!matchingSource) return;
1016
- return resolveSingleTailwindV4CssSource(matchingSource, sourceOptions, { matched: true });
1080
+ return resolveSingleTailwindV4CssSource(matchingSource, sourceOptions, {
1081
+ includesPreflight: await resolveTailwindV4CssSourceEntries(matchingSource, sourceOptions).then((resolved) => resolved?.includesPreflight),
1082
+ index: matches[0]?.index,
1083
+ matched: true,
1084
+ primary: isSameTailwindV4CssSource(matchingSource, selectionOptions?.cssSources?.[0])
1085
+ });
1017
1086
  }
1018
1087
  function tryResolveTailwindV4SourceOptions(runtimeState) {
1019
1088
  try {
@@ -1025,14 +1094,24 @@ function tryResolveTailwindV4SourceOptions(runtimeState) {
1025
1094
  function hasConfiguredTailwindV4CssSource(sourceOptions) {
1026
1095
  return Boolean(sourceOptions?.css) || Boolean(sourceOptions?.cssSources?.length);
1027
1096
  }
1097
+ function isSameTailwindV4CssSource(a, b) {
1098
+ if (!a || !b) return false;
1099
+ if (typeof a.file === "string" && typeof b.file === "string") return path.resolve(a.file) === path.resolve(b.file);
1100
+ return typeof a.css === "string" && typeof b.css === "string" && normalizeCssSourceForCompare(a.css) === normalizeCssSourceForCompare(b.css);
1101
+ }
1028
1102
  async function resolveSingleTailwindV4CssSource(cssSource, sourceOptions, options = {}) {
1029
1103
  const sourceBase = resolveTailwindV4CssSourceBase(cssSource, sourceOptions.base ?? sourceOptions.projectRoot ?? process.cwd());
1030
1104
  const normalizedCssSource = normalizeTailwindV4CssSourceConfig(cssSource, sourceBase);
1031
- return withGeneratorSourceMetadata(await resolveTailwindV4Source$1(createSingleTailwindV4SourceOptions(sourceOptions, {
1105
+ const source = await resolveTailwindV4Source$1(createSingleTailwindV4SourceOptions(sourceOptions, {
1032
1106
  base: sourceBase,
1033
1107
  css: normalizedCssSource.css
1034
- })), {
1108
+ }));
1109
+ const resolvedEntries = options.includesPreflight === void 0 ? await resolveTailwindV4CssSourceEntries(normalizedCssSource, sourceOptions) : void 0;
1110
+ return withGeneratorSourceMetadata(source, {
1111
+ cssSourceIndex: options.index,
1112
+ includesPreflight: options.includesPreflight ?? resolvedEntries?.includesPreflight,
1035
1113
  matchedCssSourceFile: options.matched && typeof normalizedCssSource.file === "string" ? normalizedCssSource.file : void 0,
1114
+ primaryCssSource: options.primary === true || !sourceOptions.cssEntries?.length && options.index === 0 || void 0,
1036
1115
  sourceBase,
1037
1116
  sourceCss: normalizedCssSource.css
1038
1117
  });
@@ -1061,6 +1140,7 @@ async function resolveCandidateMatchedTailwindV4CssSource(_rawSource, _cssHandle
1061
1140
  if (runtimeHits === 0) return;
1062
1141
  matches.push({
1063
1142
  cssSource,
1143
+ includesPreflight: resolved.includesPreflight,
1064
1144
  index,
1065
1145
  runtimeHits,
1066
1146
  totalCandidates: scopedCandidates.size
@@ -1072,10 +1152,53 @@ async function resolveCandidateMatchedTailwindV4CssSource(_rawSource, _cssHandle
1072
1152
  const second = matches[1];
1073
1153
  if (!best) return;
1074
1154
  if (second && second.runtimeHits === best.runtimeHits && second.totalCandidates === best.totalCandidates) return;
1075
- return resolveSingleTailwindV4CssSource(best.cssSource, sourceOptions, { matched: true });
1155
+ return resolveSingleTailwindV4CssSource(best.cssSource, sourceOptions, {
1156
+ includesPreflight: best.includesPreflight,
1157
+ index: best.index,
1158
+ matched: true,
1159
+ primary: isSameTailwindV4CssSource(best.cssSource, selectionOptions?.cssSources?.[0])
1160
+ });
1161
+ }
1162
+ async function resolveTailwindV4CssEntryEntries(cssEntry) {
1163
+ if (!existsSync(cssEntry)) return;
1164
+ const file = path.resolve(cssEntry);
1165
+ return resolveTailwindV4EntriesFromCss(readFileSync(file, "utf8"), path.dirname(file));
1166
+ }
1167
+ async function resolveTailwindV4CssEntryIncludesPreflight(cssEntry) {
1168
+ return resolveTailwindV4CssEntryEntries(cssEntry).then((resolved) => resolved?.includesPreflight);
1169
+ }
1170
+ async function resolveCandidateMatchedTailwindV4CssEntry(sourceOptions, selectionOptions) {
1171
+ const cssEntries = sourceOptions.cssEntries;
1172
+ const getSourceCandidatesForEntries = selectionOptions?.getSourceCandidatesForEntries;
1173
+ if (!cssEntries?.length || !getSourceCandidatesForEntries) return;
1174
+ const matches = [];
1175
+ await Promise.all(cssEntries.map(async (cssEntry, index) => {
1176
+ const resolved = await resolveTailwindV4CssEntryEntries(cssEntry);
1177
+ if (resolved?.entries === void 0) return;
1178
+ const scopedCandidates = getSourceCandidatesForEntries(resolved.entries);
1179
+ const runtimeHits = countRuntimeCandidateHits(scopedCandidates, selectionOptions?.runtime);
1180
+ if (runtimeHits === 0) return;
1181
+ matches.push({
1182
+ cssEntry,
1183
+ includesPreflight: resolved.includesPreflight,
1184
+ index,
1185
+ runtimeHits,
1186
+ totalCandidates: scopedCandidates.size
1187
+ });
1188
+ }));
1189
+ if (matches.length === 0) return;
1190
+ matches.sort((a, b) => b.runtimeHits - a.runtimeHits || b.totalCandidates - a.totalCandidates || a.index - b.index);
1191
+ const best = matches[0];
1192
+ const second = matches[1];
1193
+ if (!best) return;
1194
+ if (second && second.runtimeHits === best.runtimeHits && second.totalCandidates === best.totalCandidates) return;
1195
+ return resolveTailwindV4CssEntrySource(best.cssEntry, sourceOptions, {
1196
+ includesPreflight: best.includesPreflight,
1197
+ index: best.index
1198
+ });
1076
1199
  }
1077
1200
  function createTailwindV4CssSourceResolver(sourceOptions, generatorOptions) {
1078
- return (cssSource) => resolveSingleTailwindV4CssSource(cssSource, sourceOptions).then((source) => generatorOptions?.config ? {
1201
+ return (cssSource, index) => resolveSingleTailwindV4CssSource(cssSource, sourceOptions, { index }).then((source) => generatorOptions?.config ? {
1079
1202
  ...source,
1080
1203
  css: prependConfigDirective(source.css, generatorOptions.config)
1081
1204
  } : source);
@@ -1088,11 +1211,19 @@ async function resolveTailwindV4SourceSideEntrySource(resolvedEntrySource, sourc
1088
1211
  sourceFile: resolvedEntrySource.file
1089
1212
  });
1090
1213
  const css = createTailwindV4SourceReferenceSource(normalizeConfigDirective(prependConfigDirective(resolvedEntrySource.css, generatorOptions?.config), config), resolvedSourceOptions);
1091
- return withMatchedSourceSideMetadata(await resolveTailwindV4Source$1(createSingleTailwindV4SourceOptions(resolvedSourceOptions, {
1214
+ const source = await resolveTailwindV4Source$1(createSingleTailwindV4SourceOptions(resolvedSourceOptions, {
1092
1215
  base: resolvedEntrySource.base,
1093
1216
  css,
1094
1217
  cssEntries: [resolvedEntrySource.file]
1095
- })), resolvedEntrySource);
1218
+ }));
1219
+ const cssEntryIndex = sourceOptions.cssEntries?.findIndex((cssEntry) => typeof resolvedEntrySource.file === "string" && path.resolve(cssEntry.replace(/[?#].*$/, "")) === path.resolve(resolvedEntrySource.file));
1220
+ const cssSourceIndex = sourceOptions.cssSources?.findIndex((cssSource) => typeof cssSource.file === "string" && typeof resolvedEntrySource.file === "string" && path.resolve(cssSource.file.replace(/[?#].*$/, "")) === path.resolve(resolvedEntrySource.file));
1221
+ return withMatchedSourceSideMetadata(source, resolvedEntrySource, {
1222
+ cssEntryIndex,
1223
+ cssSourceIndex,
1224
+ includesPreflight: (await resolveTailwindV4EntriesFromCss(resolvedEntrySource.css, resolvedEntrySource.base))?.includesPreflight,
1225
+ primaryCssSource: cssEntryIndex === 0 || !sourceOptions.cssEntries?.length && cssSourceIndex === 0
1226
+ });
1096
1227
  }
1097
1228
  async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, selectionOptions) {
1098
1229
  const base = resolveCssSourceBase(file, cssHandlerOptions);
@@ -1110,7 +1241,7 @@ async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, fi
1110
1241
  sourceFile: sourceOptions.sourceFile ?? resolvePostcssSourceFile(cssHandlerOptions),
1111
1242
  ...resolveCssHandlerSourceOptions(cssHandlerOptions),
1112
1243
  cssEntries: selectionOptions?.cssEntries ?? sourceOptions.cssEntries,
1113
- cssSources: mergeCssSources(sourceOptions.cssSources, sourceOptions.cssSources?.length ? void 0 : createCssEntrySources(selectionOptions?.cssEntries ?? sourceOptions.cssEntries))
1244
+ cssSources: mergeCssSources(mergeCssSources(sourceOptions.cssSources, selectionOptions?.cssSources), sourceOptions.cssSources?.length || selectionOptions?.cssSources?.length ? void 0 : createCssEntrySources(selectionOptions?.cssEntries ?? sourceOptions.cssEntries))
1114
1245
  }) : void 0;
1115
1246
  const normalizedSourceOptions = resolvedSourceOptions ? normalizeTailwindV4CssSourceConfigs(resolvedSourceOptions) : void 0;
1116
1247
  if (applyEntrySource && !cssHandlerOptions.isMainChunk && !hasTailwindRootDirectives(rawSource, { importFallback: generatorOptions?.importFallback ?? false })) {
@@ -1125,16 +1256,20 @@ async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, fi
1125
1256
  const sourceSideCssSource = sourceSideEntrySource?.file && normalizedSourceOptions.cssEntries?.some((cssEntry) => path.resolve(cssEntry.replace(/[?#].*$/, "")) === path.resolve(sourceSideEntrySource.file)) ? await resolveTailwindV4SourceSideEntrySource(sourceSideEntrySource, normalizedSourceOptions, generatorOptions, file) : void 0;
1126
1257
  if (sourceSideCssSource) return sourceSideCssSource;
1127
1258
  const matchedCssEntrySource = normalizedSourceOptions ? await resolveMatchingTailwindV4CssEntry(rawSource, file, normalizedSourceOptions) : void 0;
1128
- const matchedCssSource = normalizedSourceOptions && !matchedCssEntrySource ? await resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, normalizedSourceOptions) : void 0;
1259
+ const matchedCssSource = normalizedSourceOptions && !matchedCssEntrySource ? await resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, normalizedSourceOptions, selectionOptions) : void 0;
1260
+ const candidateMatchedCssEntrySource = normalizedSourceOptions && !matchedCssEntrySource ? await resolveCandidateMatchedTailwindV4CssEntry(normalizedSourceOptions, selectionOptions) : void 0;
1129
1261
  const candidateMatchedCssSource = normalizedSourceOptions && !matchedCssEntrySource ? await resolveCandidateMatchedTailwindV4CssSource(rawSource, cssHandlerOptions, normalizedSourceOptions, selectionOptions) : void 0;
1130
- const singleConfiguredCssSource = normalizedSourceOptions?.cssSources?.length === 1 ? await resolveSingleTailwindV4CssSource(normalizedSourceOptions.cssSources[0], normalizedSourceOptions, { matched: true }) : void 0;
1262
+ const singleConfiguredCssSource = normalizedSourceOptions?.cssSources?.length === 1 ? await resolveSingleTailwindV4CssSource(normalizedSourceOptions.cssSources[0], normalizedSourceOptions, {
1263
+ index: 0,
1264
+ matched: true
1265
+ }) : void 0;
1131
1266
  const configuredCssSource = normalizedSourceOptions && hasConfiguredTailwindV4CssSource(normalizedSourceOptions) && hasTailwindGeneratedCssMarkers(rawSource) ? matchedCssSource ?? candidateMatchedCssSource ?? singleConfiguredCssSource ?? await resolveTailwindV4Source$1(normalizedSourceOptions) : void 0;
1132
1267
  if (configuredCssSource) return generatorOptions?.config ? {
1133
1268
  ...configuredCssSource,
1134
1269
  css: prependConfigDirective(configuredCssSource.css, generatorOptions.config)
1135
1270
  } : configuredCssSource;
1136
1271
  const mainCssEntrySource = normalizedSourceOptions && cssHandlerOptions.isMainChunk && normalizedSourceOptions.cssEntries?.length === 1 ? await resolveTailwindV4CssEntrySource(normalizedSourceOptions.cssEntries[0], normalizedSourceOptions) : void 0;
1137
- const preferredCssEntrySource = matchedCssEntrySource ?? matchedCssSource ?? candidateMatchedCssSource ?? mainCssEntrySource ?? singleConfiguredCssSource;
1272
+ const preferredCssEntrySource = matchedCssEntrySource ?? matchedCssSource ?? candidateMatchedCssEntrySource ?? candidateMatchedCssSource ?? mainCssEntrySource ?? singleConfiguredCssSource;
1138
1273
  if (preferredCssEntrySource) return generatorOptions?.config ? {
1139
1274
  ...preferredCssEntrySource,
1140
1275
  css: prependConfigDirective(preferredCssEntrySource.css, generatorOptions.config)
@@ -1190,19 +1325,20 @@ async function resolveGeneratorSources(majorVersion, runtimeState, rawSource, fi
1190
1325
  } : matchedCssEntrySource, matchedCssEntrySource.__weappTailwindcssMeta?.matchedCssSourceFile, sourceOptions)];
1191
1326
  const sourceSideCssSource = await resolveTailwindV4SourceSideEntrySource(canResolveSourceSideCssEntry(file, cssHandlerOptions, sourceOptions) ? resolveSourceSideCssEntrySource(file, sourceOptions, { removeConfig: false }) : void 0, sourceOptions, generatorOptions, file);
1192
1327
  if (sourceSideCssSource) return [sourceSideCssSource];
1193
- const matchedCssSource = await resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, sourceOptions);
1328
+ const matchedCssSource = await resolveMatchingTailwindV4CssSource(rawSource, file, cssHandlerOptions, sourceOptions, selectionOptions);
1329
+ const candidateMatchedCssEntrySource = await resolveCandidateMatchedTailwindV4CssEntry(sourceOptions, selectionOptions);
1194
1330
  const candidateMatchedCssSource = await resolveCandidateMatchedTailwindV4CssSource(rawSource, cssHandlerOptions, sourceOptions, selectionOptions);
1195
- const preferredCssEntrySource = matchedCssEntrySource ?? matchedCssSource ?? candidateMatchedCssSource;
1331
+ const preferredCssEntrySource = matchedCssEntrySource ?? matchedCssSource ?? candidateMatchedCssEntrySource ?? candidateMatchedCssSource;
1196
1332
  if (preferredCssEntrySource) return [normalizeResolvedTailwindV4SourceConfig(generatorOptions?.config ? {
1197
1333
  ...preferredCssEntrySource,
1198
1334
  css: prependConfigDirective(preferredCssEntrySource.css, generatorOptions.config)
1199
1335
  } : preferredCssEntrySource, preferredCssEntrySource.__weappTailwindcssMeta?.matchedCssSourceFile, sourceOptions)];
1200
1336
  if (!sourceOptions.cssEntries || sourceOptions.cssEntries.length <= 1) {
1201
- if (cssHandlerOptions.isMainChunk && sourceOptions.cssEntries?.length === 1) return [await resolveTailwindV4CssEntrySource(sourceOptions.cssEntries[0], normalizeTailwindV4CssSourceConfigs(sourceOptions)).then((source) => generatorOptions?.config ? {
1337
+ if (cssHandlerOptions.isMainChunk && sourceOptions.cssEntries?.length === 1) return [await resolveTailwindV4CssEntrySource(sourceOptions.cssEntries[0], normalizeTailwindV4CssSourceConfigs(sourceOptions), { index: 0 }).then((source) => generatorOptions?.config ? {
1202
1338
  ...source,
1203
1339
  css: prependConfigDirective(source.css, generatorOptions.config)
1204
1340
  } : source)];
1205
- if (sourceOptions.cssSources?.length === 1) return [normalizeResolvedTailwindV4SourceConfig(await createTailwindV4CssSourceResolver(sourceOptions, generatorOptions)(sourceOptions.cssSources[0]), sourceOptions.cssSources[0]?.file, sourceOptions)];
1341
+ if (sourceOptions.cssSources?.length === 1) return [normalizeResolvedTailwindV4SourceConfig(await createTailwindV4CssSourceResolver(sourceOptions, generatorOptions)(sourceOptions.cssSources[0], 0), sourceOptions.cssSources[0]?.file, sourceOptions)];
1206
1342
  const resolved = await resolveGeneratorSource(majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, selectionOptions);
1207
1343
  return resolved ? [resolved] : [];
1208
1344
  }
@@ -1211,7 +1347,7 @@ async function resolveGeneratorSources(majorVersion, runtimeState, rawSource, fi
1211
1347
  return resolved ? [resolved] : [];
1212
1348
  }
1213
1349
  const normalizedCssSourceOptions = normalizeTailwindV4CssSourceConfigs(sourceOptions);
1214
- const cssEntrySources = await Promise.all(sourceOptions.cssEntries.map((cssEntry) => resolveTailwindV4CssEntrySource(cssEntry, normalizedCssSourceOptions).then((source) => generatorOptions?.config ? {
1350
+ const cssEntrySources = await Promise.all(sourceOptions.cssEntries.map((cssEntry, index) => resolveTailwindV4CssEntrySource(cssEntry, normalizedCssSourceOptions, { index }).then((source) => generatorOptions?.config ? {
1215
1351
  ...source,
1216
1352
  css: prependConfigDirective(source.css, generatorOptions.config)
1217
1353
  } : source)));
@@ -2313,7 +2449,7 @@ async function generateCssByGenerator(options) {
2313
2449
  });
2314
2450
  const runtimeWithCurrentCss = createRuntimeWithCurrentCssCandidates(runtime, currentCssCandidates, isolateCurrentCssCandidates);
2315
2451
  const sources = await resolveGeneratorSources(majorVersion, runtimeState, generatorRawSource, file, cssHandlerOptions, generatorOptions, {
2316
- cssEntries: opts.cssEntries,
2452
+ cssEntries: cssHandlerOptions.sourceOptions?.cssEntries ?? opts.cssEntries,
2317
2453
  cssSources: options.cssSources,
2318
2454
  getSourceCandidatesForEntries,
2319
2455
  runtime: runtimeWithCurrentCss
@@ -2382,6 +2518,19 @@ async function generateCssByGenerator(options) {
2382
2518
  const generatedCssSource = generated.target === "web" ? generated.css : stripTailwindBanner(generated.css);
2383
2519
  const generatedCss = shouldFilterApplyOnlyCss ? filterApplyOnlyGeneratedCss(generatedCssSource, generatorRawSource) : generatedCssSource;
2384
2520
  const hasMatchedCssSourceFile = sources.some((source) => source.__weappTailwindcssMeta?.matchedCssSourceFile);
2521
+ const hasExplicitCssSource = sources.some((source) => {
2522
+ const metadata = source.__weappTailwindcssMeta;
2523
+ return metadata?.cssEntryIndex !== void 0 || metadata?.cssSourceIndex !== void 0;
2524
+ });
2525
+ const hasPreflightCssSource = sources.some((source) => source.__weappTailwindcssMeta?.includesPreflight === true);
2526
+ const hasPreflightRawSource = includesTailwindV4PreflightDirective(generatorRawSource);
2527
+ const preflightMode = resolveMiniProgramPreflightModeForGeneratorCss(opts, {
2528
+ cssHandlerOptions,
2529
+ isolateCurrentCssCandidates,
2530
+ localImports,
2531
+ explicitCssSource: hasExplicitCssSource,
2532
+ primaryCssSource: sources.length > 0 && sources.every((source) => source.__weappTailwindcssMeta?.primaryCssSource === true) || hasPreflightCssSource || hasPreflightRawSource
2533
+ });
2385
2534
  const orderedExtraCss = splitGeneratorPlaceholderCssBySourceOrder(userCssOrderSource, generated.rawCss) ?? (hasMatchedCssSourceFile ? splitTailwindV4GeneratedCssBySourceOrder(userCssOrderSource, generated.rawCss) : splitRawSourceByGeneratedCssOrder(userCssOrderSource, generated.rawCss));
2386
2535
  const shouldAppendMatchedCssSourceCompat = !hasMatchedCssSourceFile || orderedExtraCss !== void 0;
2387
2536
  if (orderedExtraCss) {
@@ -2429,11 +2578,8 @@ async function generateCssByGenerator(options) {
2429
2578
  }
2430
2579
  } else if (generated.target === "weapp" && shouldFinalizeMarkedUserLayerComponentsCss(file)) css = reorderMarkedUserLayerComponentsCss(css);
2431
2580
  const finalCss = finalizeGeneratorCss(css, generated.target, {
2432
- injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
2433
- cssHandlerOptions,
2434
- isolateCurrentCssCandidates,
2435
- localImports
2436
- }),
2581
+ injectPreflight: preflightMode.inject,
2582
+ preservePreflight: preflightMode.preserve,
2437
2583
  styleOptions: generatorStyleOptions
2438
2584
  });
2439
2585
  return {
@@ -2537,11 +2683,8 @@ async function generateCssByGenerator(options) {
2537
2683
  css = createCssSourceOrderAppend$1(css, missingUserCss);
2538
2684
  }
2539
2685
  const finalCss = finalizeGeneratorCss(css, generated.target, {
2540
- injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
2541
- cssHandlerOptions,
2542
- isolateCurrentCssCandidates,
2543
- localImports
2544
- }),
2686
+ injectPreflight: preflightMode.inject,
2687
+ preservePreflight: preflightMode.preserve,
2545
2688
  styleOptions: generatorStyleOptions
2546
2689
  });
2547
2690
  return {
@@ -2574,11 +2717,8 @@ async function generateCssByGenerator(options) {
2574
2717
  css = createCssSourceOrderAppend$1(css, missingUserCss);
2575
2718
  }
2576
2719
  const finalCss = finalizeGeneratorCss(css, generated.target, {
2577
- injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
2578
- cssHandlerOptions,
2579
- isolateCurrentCssCandidates,
2580
- localImports
2581
- }),
2720
+ injectPreflight: preflightMode.inject,
2721
+ preservePreflight: preflightMode.preserve,
2582
2722
  styleOptions: generatorStyleOptions
2583
2723
  });
2584
2724
  return {
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_framework = require("./framework.js");
3
3
  const require_generator = require("./generator-CilgHtxb.js");
4
- const require_gulp = require("./gulp-Bogfnoki.js");
4
+ const require_gulp = require("./gulp-CuVsZdO9.js");
5
5
  const require_postcss = require("./postcss.js");
6
- const require_vite = require("./vite-BYgT1ir9.js");
7
- const require_webpack = require("./webpack-khSwkXP5.js");
6
+ const require_vite = require("./vite-Yp14HNyS.js");
7
+ const require_webpack = require("./webpack-DN3tgLbF.js");
8
8
  require("./webpack.js");
9
9
  let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
10
10
  exports.WeappTailwindcss = require_vite.WeappTailwindcss;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.mjs";
2
2
  import { t as createWeappTailwindcssGenerator } from "./generator-24-HgU9F.mjs";
3
- import { t as createPlugins } from "./gulp-0RsqkF_d.mjs";
3
+ import { t as createPlugins } from "./gulp-ygWfmOqh.mjs";
4
4
  import weappTailwindcssPostcssPlugin from "./postcss.mjs";
5
- import { t as WeappTailwindcss } from "./vite-B1SlBmqO.mjs";
6
- import { n as weappTailwindcssPackageDir } from "./webpack-Bg6pefpb.mjs";
5
+ import { t as WeappTailwindcss } from "./vite-cH0tTMHc.mjs";
6
+ import { n as weappTailwindcssPackageDir } from "./webpack-DBhmJ-_P.mjs";
7
7
  import "./webpack.mjs";
8
8
  import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
9
9
  export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
@@ -0,0 +1 @@
1
+ export declare function jsStringEscape(value: unknown): string;
package/dist/presets.js CHANGED
@@ -3,7 +3,7 @@ const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
3
3
  const require_framework = require("./framework.js");
4
4
  const require_v4_engine = require("./v4-engine-CKtsdKxK.js");
5
5
  require("./utils-D3h8j7Mk.js");
6
- const require_tailwindcss = require("./tailwindcss-D2xs4OEu.js");
6
+ const require_tailwindcss = require("./tailwindcss-BwoNQ3t8.js");
7
7
  require("./logger-TlKT3xmR.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_rolldown_runtime.__toESM(node_path);
package/dist/presets.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { resolveTaroPlatform, resolveUniPlatformsFromEnv } from "./framework.mjs";
2
2
  import { ct as omitUndefined } from "./v4-engine-BuuYDXt1.mjs";
3
3
  import { n as defuOverrideArray } from "./utils-DodxWHGz.mjs";
4
- import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-D0JF0fuZ.mjs";
4
+ import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-C-uM4rB8.mjs";
5
5
  import { t as logger } from "./logger-BNzxZbZj.mjs";
6
6
  import path from "node:path";
7
7
  import process from "node:process";
package/dist/rspack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
3
- const require_webpack = require("./webpack-khSwkXP5.js");
3
+ const require_webpack = require("./webpack-DN3tgLbF.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_rolldown_runtime.__toESM(node_path);
6
6
  //#region src/bundlers/rspack/index.ts
package/dist/rspack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-Bg6pefpb.mjs";
1
+ import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-DBhmJ-_P.mjs";
2
2
  import path from "node:path";
3
3
  //#region src/bundlers/rspack/index.ts
4
4
  const CSS_IMPORT_REWRITE_LOADER_NAME = "weapp-tw-css-import-rewrite-loader";