weapp-tailwindcss 5.5.5 → 5.5.7
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/{auto-DtU6f3X6.cjs → auto-B1OyRrE8.cjs} +1 -1
- package/dist/{auto-2dg_uhEJ.js → auto-ENr4xzzw.js} +1 -1
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -4
- package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -1
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
- package/dist/bundlers/shared/css-source-trace.d.ts +2 -5
- package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/framework-css-composition.d.ts +1 -0
- package/dist/bundlers/shared/framework-postcss.d.ts +1 -24
- package/dist/bundlers/shared/framework-user-css.d.ts +1 -3
- package/dist/bundlers/shared/generated-css-marker.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/candidates.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/class-selectors.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/directives/fallback.d.ts +1 -11
- package/dist/bundlers/shared/generator-css/directives.d.ts +1 -25
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +1 -19
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +1 -25
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +1 -30
- package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/local-imports.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/markers.d.ts +1 -28
- package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +1 -8
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +1 -58
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +1 -6
- package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -21
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -13
- package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +1 -7
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +1 -33
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -28
- package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -14
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +1 -16
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +1 -22
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -7
- package/dist/bundlers/shared/generator-css/types.d.ts +1 -61
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -15
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -10
- package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +1 -15
- package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +1 -10
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -7
- package/dist/bundlers/shared/generator-css.d.ts +1 -9
- package/dist/bundlers/shared/run-tasks.d.ts +1 -3
- package/dist/bundlers/shared/runtime-class-set.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/collector.d.ts +1 -8
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +1 -12
- package/dist/bundlers/shared/source-candidates/script.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/snapshot.d.ts +1 -19
- package/dist/bundlers/shared/source-candidates/source-priority.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/store.d.ts +1 -2
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -75
- package/dist/bundlers/shared/source-candidates/views.d.ts +1 -12
- package/dist/bundlers/shared/source-candidates.d.ts +1 -4
- package/dist/bundlers/shared/source-scan/css-entries.d.ts +1 -18
- package/dist/bundlers/shared/source-scan/dependencies.d.ts +1 -2
- package/dist/bundlers/shared/source-scan.d.ts +1 -16
- package/dist/bundlers/shared/static-config-content.d.ts +1 -5
- package/dist/bundlers/shared/style-handler-options.d.ts +1 -0
- package/dist/bundlers/shared/style-requests.d.ts +1 -5
- package/dist/bundlers/shared/v4-generation-core.d.ts +1 -21
- package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +3 -0
- package/dist/bundlers/vite/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/frameworks/generic/web.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/finalize/sync-processed-css.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/framework-style-memory.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/web-css-module.d.ts +1 -0
- package/dist/bundlers/vite/plugin-hook.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -10
- package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +1 -4
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +4 -7
- package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -13
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +3 -1
- package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +3 -2
- package/dist/bundlers/vite/shared/framework-runtime-configuration.d.ts +3 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +9 -0
- package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +6 -5
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +3 -3
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +3 -1
- package/dist/bundlers/vite/shared/hmr-source.d.ts +2 -0
- package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -1
- package/dist/bundlers/vite/source-candidates.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +2 -7
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +4 -8
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +2 -7
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +2 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +6 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +1 -1
- package/dist/cache/index.d.ts +4 -4
- package/dist/cache/source.d.ts +29 -0
- package/dist/{cache-CBJFB1HN.cjs → cache-CzvIGfwS.cjs} +1 -0
- package/dist/compiler/composition.d.ts +1 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/runtime-affecting-signature/js.d.ts +1 -0
- package/dist/compiler/semantic-css.d.ts +1 -1
- package/dist/compiler/types.d.ts +1 -1
- package/dist/{compiler-D_vxtEdw.js → compiler-CThodfGH.js} +3105 -3065
- package/dist/{compiler-Cc0JXfbw.cjs → compiler-DkGY5Nmh.cjs} +22414 -45557
- package/dist/core/compiler/generation-cache.d.ts +4 -2
- package/dist/core/compiler/transforms.d.ts +1 -1
- package/dist/core/compiler/types.d.ts +1 -1
- package/dist/core.cjs +10 -10
- package/dist/core.d.ts +2 -2
- package/dist/core.js +5 -5
- package/dist/css-cleanup-B6FUJC3z.cjs +1 -0
- package/dist/{css-imports-FRZwX4P6.cjs → css-imports-R_RDMjPz.cjs} +7 -22
- package/dist/css-macro/auto.d.ts +1 -1
- package/dist/css-macro/postcss.cjs +1 -1
- package/dist/css-macro.cjs +3 -3
- package/dist/css-macro.js +2 -2
- package/dist/{defaults-CKx-4LcW.js → defaults-AQuvJS-h.js} +4 -2
- package/dist/{defaults-CiGsr8Xq.cjs → defaults-CyX5iO9y.cjs} +4 -2
- package/dist/defaults.cjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/final-css-cleanup-B6FUJC3z.cjs +1 -0
- package/dist/{final-css-cleanup-B0HUBtiE.js → final-css-cleanup-BOzhuhGz.js} +3 -127
- package/dist/framework/index.d.ts +1 -1
- package/dist/framework/platform.d.ts +2 -2
- package/dist/framework.cjs +1 -1
- package/dist/{v4-generation-core-DJBWZ_D0.cjs → generated-css-marker-jMNbQHpy.cjs} +717 -1730
- package/dist/generation/candidates.d.ts +1 -0
- package/dist/generation/class-selectors.d.ts +4 -0
- package/dist/generation/config-directive.d.ts +1 -0
- package/dist/generation/directives/fallback.d.ts +1 -0
- package/dist/generation/directives.d.ts +1 -0
- package/dist/generation/framework-css-composition.d.ts +1 -0
- package/dist/generation/framework-postcss.d.ts +25 -0
- package/dist/generation/framework-user-css.d.ts +5 -0
- package/dist/generation/generation-helpers/preflight.d.ts +19 -0
- package/dist/generation/generation-helpers/results.d.ts +23 -0
- package/dist/generation/generation-helpers/runtime-isolation.d.ts +30 -0
- package/dist/generation/generation-helpers/source-order.d.ts +1 -0
- package/dist/generation/generation-helpers.d.ts +4 -0
- package/dist/generation/index.d.ts +9 -0
- package/dist/generation/legacy-compat.d.ts +12 -0
- package/dist/generation/legacy-selectors.d.ts +1 -0
- package/dist/generation/legacy-units.d.ts +1 -0
- package/dist/generation/local-imports.d.ts +1 -0
- package/dist/generation/markers.d.ts +1 -0
- package/dist/generation/output-import-shell.d.ts +1 -0
- package/dist/generation/pipeline/context.d.ts +60 -0
- package/dist/generation/pipeline/deferred-output.d.ts +3 -0
- package/dist/generation/pipeline/execution.d.ts +3 -0
- package/dist/generation/pipeline/fallback-output.d.ts +3 -0
- package/dist/generation/pipeline/ordered-output.d.ts +3 -0
- package/dist/generation/pipeline/preparation.d.ts +19 -0
- package/dist/generation/pipeline.d.ts +2 -0
- package/dist/generation/result-helpers.d.ts +6 -0
- package/dist/generation/scoped-rules.d.ts +1 -0
- package/dist/generation/service.d.ts +20 -0
- package/dist/generation/source-files.d.ts +21 -0
- package/dist/generation/source-resolver/apply-reference.d.ts +10 -0
- package/dist/generation/source-resolver/config.d.ts +7 -0
- package/dist/generation/source-resolver/configuration.d.ts +33 -0
- package/dist/generation/source-resolver/matching.d.ts +3 -0
- package/dist/generation/source-resolver/metadata.d.ts +28 -0
- package/dist/generation/source-resolver/postcss-source.d.ts +14 -0
- package/dist/generation/source-resolver/resolve-source.d.ts +4 -0
- package/dist/generation/source-resolver/resolve-sources.d.ts +5 -0
- package/dist/generation/source-resolver/single-source.d.ts +16 -0
- package/dist/generation/source-resolver/source-entries.d.ts +3 -0
- package/dist/generation/source-resolver/source-matching.d.ts +5 -0
- package/dist/generation/source-resolver/types.d.ts +22 -0
- package/dist/generation/source-resolver.d.ts +7 -0
- package/dist/generation/style-options.d.ts +8 -0
- package/dist/generation/style-requests.d.ts +5 -0
- package/dist/generation/types.d.ts +65 -0
- package/dist/generation/user-css/apply-only.d.ts +5 -0
- package/dist/generation/user-css/at-rules.d.ts +1 -0
- package/dist/generation/user-css/compile-functions.d.ts +3 -0
- package/dist/generation/user-css/generated-cleanup.d.ts +1 -0
- package/dist/generation/user-css/source-fragments.d.ts +1 -0
- package/dist/generation/user-css/transform.d.ts +1 -0
- package/dist/generation/user-css/user-layers.d.ts +1 -0
- package/dist/generation/user-css.d.ts +5 -0
- package/dist/generation/user-layer-order.d.ts +1 -0
- package/dist/generation/validate.d.ts +7 -0
- package/dist/generator-CxauQbx3.cjs +1868 -0
- package/dist/generator-oKZ5mCJ5.js +1637 -0
- package/dist/generator.cjs +10 -4
- package/dist/generator.js +1 -1
- package/dist/{gulp-Dnt8VL8D.cjs → gulp-CVvBpIlq.cjs} +27 -26
- package/dist/{gulp-B1mPTMqw.js → gulp-DhddVxGA.js} +6 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-qpX410qU.cjs → hmr-timing-DfMbbZ1E.cjs} +13 -13
- package/dist/{hmr-timing-wAt0LavM.js → hmr-timing-xPpat-km.js} +601 -1548
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/js/ModuleGraph.d.ts +3 -1
- package/dist/js/NodePathWalker.d.ts +1 -1
- package/dist/js/babel/analyze.d.ts +6 -0
- package/dist/js/babel.d.ts +1 -2
- package/dist/js/fast-path/analysis.d.ts +14 -0
- package/dist/js/fast-path/oxc.d.ts +1 -1
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/node-path-walker/import-tokens.d.ts +1 -1
- package/dist/js/oxc-parser.d.ts +4 -0
- package/dist/pipeline-helpers-zMPmp5F3.cjs +516 -0
- package/dist/postcss-html-transform.cjs +1 -1
- package/dist/postcss.cjs +3 -2
- package/dist/postcss.d.ts +1 -1
- package/dist/postcss.js +3 -2
- package/dist/presets.cjs +3 -3
- package/dist/presets.js +2 -2
- package/dist/project-sources/candidates/collector.d.ts +8 -0
- package/dist/project-sources/candidates/scan-root.d.ts +12 -0
- package/dist/project-sources/candidates/script.d.ts +1 -0
- package/dist/project-sources/candidates/snapshot.d.ts +19 -0
- package/dist/project-sources/candidates/source-priority.d.ts +1 -0
- package/dist/project-sources/candidates/store.d.ts +2 -0
- package/dist/project-sources/candidates/types-and-cache.d.ts +75 -0
- package/dist/project-sources/candidates/views.d.ts +12 -0
- package/dist/project-sources/candidates.d.ts +4 -0
- package/dist/project-sources/css-entries.d.ts +18 -0
- package/dist/project-sources/dependencies.d.ts +2 -0
- package/dist/project-sources/index.d.ts +16 -0
- package/dist/project-sources/static-config-content.d.ts +5 -0
- package/dist/reset.cjs +1 -1
- package/dist/{rolldown-runtime-Ctb5zv51.cjs → rolldown-runtime-fg3euq-1.cjs} +7 -0
- package/dist/rspack.cjs +4 -4
- package/dist/rspack.js +2 -2
- package/dist/{runtime-state-XYSycuGu.cjs → runtime-state-BOzuVoKl.cjs} +1 -1
- package/dist/{scoped-generator-CtetE5rm.cjs → scoped-generator-BIZ7N_J-.cjs} +51 -36
- package/dist/{scoped-generator-BqxVxNp9.js → scoped-generator-DlQrVbuC.js} +49 -33
- package/dist/{source-candidate-scan-signature-Lm32zKVA.js → source-candidate-scan-signature-BjVQYL-C.js} +22 -5
- package/dist/{source-candidate-scan-signature-BDGB9nKZ.cjs → source-candidate-scan-signature-nG-rg809.cjs} +34 -5
- package/dist/style-injector/internal.d.ts +118 -8
- package/dist/style-injector/options.d.ts +6 -2
- package/dist/tailwindcss/miniprogram.d.ts +1 -1
- package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -1
- package/dist/tailwindcss/runtime-options.d.ts +5 -0
- package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -7
- package/dist/tailwindcss/source-scan.d.ts +3 -32
- package/dist/tailwindcss/v4/css-sources.d.ts +1 -1
- package/dist/tailwindcss/v4/preflight.d.ts +1 -4
- package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +4 -0
- package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +2 -3
- package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +1 -6
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +5 -2
- package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +1 -3
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +3 -7
- package/dist/tailwindcss/v4-engine/source.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/types.d.ts +3 -1
- package/dist/{tailwindcss-9e6ZuYgS.cjs → tailwindcss-U3KIUegn.cjs} +66 -271
- package/dist/{tailwindcss-DTV9MoJT.js → tailwindcss-kSd0ykiX.js} +73 -251
- package/dist/{transform-BbbZvFQq.js → transform-BAon9ykq.js} +35 -20
- package/dist/{transform-D21f8Dm8.cjs → transform-D2KFdA3C.cjs} +41 -26
- package/dist/types/index.d.ts +4 -3
- package/dist/types/user-defined-options/general.d.ts +1 -1
- package/dist/uni-app-x/border-preflight.d.ts +1 -2
- package/dist/uni-app-x/component-local-style.d.ts +4 -1
- package/dist/uni-app-x/transform.d.ts +4 -2
- package/dist/uni-app-x/vite/author-apply.d.ts +3 -1
- package/dist/uni-app-x/vite/native-hmr.d.ts +1 -1
- package/dist/uni-app-x/vite/style-result.d.ts +5 -0
- package/dist/utils/run-tasks.d.ts +3 -0
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-CaH7WjX6.cjs → vite-BxW0qd7J.cjs} +677 -1315
- package/dist/{vite-CuYntLZP.js → vite-D-RGkmOE.js} +541 -1173
- package/dist/vite-web.d.ts +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-GbC14Rlt.cjs → watch-dependencies-C1so1whD.cjs} +14 -1
- package/dist/weapp-tw-css-generation-loader.cjs +4 -3
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +34 -29
- package/dist/weapp-tw-runtime-classset-loader.cjs +5 -18
- package/dist/{web-CdXkY_VO.js → web--kA4HUTm.js} +149 -211
- package/dist/{web-CYs2Kcaa.cjs → web-Y-H6I1k6.cjs} +226 -286
- package/dist/{webpack-BnCSOUuu.js → webpack-BB-kw4Qr.js} +38 -450
- package/dist/{webpack-BQNnpQPC.cjs → webpack-DxrWatNB.cjs} +97 -97
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/custom-template.d.ts +1 -1
- package/package.json +16 -13
- package/dist/final-css-cleanup-DSjczga3.cjs +0 -138
- package/dist/generator-BdSIvFEO.cjs +0 -3905
- package/dist/generator-CAOx1Sqm.js +0 -3357
- package/dist/pipeline-helpers-BHagysZY.cjs +0 -971
- package/dist/tailwindcss/v4-engine/css-import.d.ts +0 -14
- package/dist/uni-app-x/style-asset/source-parser.d.ts +0 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { f as resolveSourceScanEntries, g as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature, v as source_scan_exports } from "./tailwindcss-kSd0ykiX.js";
|
|
2
|
+
import { L as getTailwindV4IncrementalGenerateCacheStats, N as _defineProperty, _ as upsertTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, k as resolveTailwindcssOptions, o as resolveRuntimeBranch } from "./generator-oKZ5mCJ5.js";
|
|
3
3
|
import { r as getGroupedEntries } from "./utils-MVwpU07P.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { a as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { a as toAbsoluteOutputPath, i as resolveOutputSpecifier, n as resolvePackageDir, t as createSourceCandidateScanSignature } from "./source-candidate-scan-signature-
|
|
4
|
+
import { A as createTailwindRuntimeReadyPromise, G as createCompilationDependencyChanges, I as AssetEmissionPlan, M as refreshTailwindRuntimeState, N as createDebug, V as recordCompilationDependencyChanges, a as beginCompilerShadowRun, f as getCompilerContext, h as pluginName, i as disposeCompilerOwner, j as ensureRuntimeClassSet, m as resolveStyleOptionsFromContext, n as createRuntimeAffectingSourceSignature, p as normalizeStyleHandlerMajorVersion, q as md5Hash, t as createCompilerRuntimeState, y as shouldSkipJsTransform, z as getCompilationScopeDependencyRevision } from "./compiler-CThodfGH.js";
|
|
5
|
+
import { n as getDefaultCssPreflight } from "./defaults-AQuvJS-h.js";
|
|
6
|
+
import { A as stripTailwindSourceMediaFragments, D as isCommentOnlyCss, F as collectFrameworkPostcssOptionsFromLoaderEntries, G as createEscapeFragments, H as stripRequestQuery, I as hasTailwindGeneratedCss, K as isPureLocalCssImportWrapper, L as hasTailwindGeneratedCssMarkers, O as removeMiniProgramInteractiveSelectors, P as captureResolvedFrameworkPostcssOptions, S as removeGeneratedSelectorCompatCss, U as createRuntimeClassSetManager, V as isSourceStyleRequest, W as collectStrictEscapedRuntimeCandidates, X as createSourceCandidateStore, Z as isSourceCandidateRequest, _ as resolveTaskConcurrency, a as hasBundlerGeneratedCssMarker, at as hasTailwindSourceDirectives, c as annotateCssSourceTrace, ct as parseImportRequest, d as isCssSourceTraceEnabled, dt as finalizeCompilerShadowRun, et as resolveSourceCandidateScanFiles, f as generateTailwindV4Css, g as pushConcurrentTaskFactories, h as collectRawSourceClassSelectors, it as hasTailwindRootDirectives, j as stripUnmatchedTailwindSourceMediaCloseFragments, k as removeTailwindV4GeneratorAtRules, l as createCssSourceTraceCacheSignature, lt as removeTailwindSourceDirectives, n as emitHmrTiming, nt as hasTailwindApplyDirective, ot as normalizeTailwindConfigDirectives$1, s as stripBundlerGeneratedCssMarkers, u as createCssTokenSourceMap, x as scoreTailwindV4CssSourceFileMatch, z as hasMiniProgramTailwindV4PreflightReset } from "./hmr-timing-xPpat-km.js";
|
|
7
|
+
import { a as createRuntimeCompilationBuildState, c as updateRuntimeCompilationBuildState, i as createRuntimeCompilationAffectingSignature, n as processCachedTask, r as buildRuntimeCompilationSnapshot, s as resetRuntimeCompilationBuildState, t as finalizeMiniProgramCssStructure } from "./final-css-cleanup-BOzhuhGz.js";
|
|
8
|
+
import { _ as createBuiltinWebpackStyleInjectorPlugin, c as createCandidateSignature, h as resolvePluginDisabledState, i as finalizeMiniProgramCss$1, m as classifyRuntimeEntry, n as createScopedGeneratorRuntime, o as pruneMiniProgramGeneratedCss, s as stripMiniProgramCssSpecificityPlaceholders, x as resolveWebpackFrameworkProfile, y as webpackStyleInjectorDelegates } from "./scoped-generator-DlQrVbuC.js";
|
|
9
|
+
import { a as toAbsoluteOutputPath, i as resolveOutputSpecifier, n as resolvePackageDir, t as createSourceCandidateScanSignature } from "./source-candidate-scan-signature-BjVQYL-C.js";
|
|
10
10
|
import Module, { createRequire } from "node:module";
|
|
11
11
|
import fs from "node:fs";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import process from "node:process";
|
|
14
|
-
import { dedupeCoveredCssRules, filterExistingCssRules,
|
|
14
|
+
import { collectGeneratedCssClassCandidates, collectWebpackAssetUserCssMarkers, collectWebpackBareSelectorUserCss, composeProcessedCssSources as createWebpackGeneratorUserCssSourceAppend, dedupeCoveredCssRules, dedupeMiniProgramPreflightSelectorRules, ensureWebpackMiniProgramTwContentInit, filterExistingCssRules, hasAdditionalWebpackAssetUserCssMarkers, hasMiniProgramPreflightSelector, hasMiniProgramPreflightSelector as hasMiniProgramPreflightSelector$1, hasWebpackTailwindSourceDirectives, isOnlyWebpackTailwindGeneratedPreflightCss, isWebpackCssSourceRepresentedInAsset, postcss, removeMiniProgramPreflightSelectorRule, removeTailwindV4StandaloneHostPreflightRule, removeWebpackGeneratorNonTailwindImports, removeWebpackTailwindGeneratedAssetCss, stripTrailingLineWhitespace } from "@weapp-tailwindcss/postcss/transform";
|
|
15
15
|
import { readFile, stat } from "node:fs/promises";
|
|
16
|
-
import micromatch from "micromatch";
|
|
17
16
|
import { MappingChars2String } from "@weapp-core/escape";
|
|
18
17
|
import { fileURLToPath } from "node:url";
|
|
18
|
+
import micromatch from "micromatch";
|
|
19
19
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/shared.ts
|
|
20
20
|
function getCacheKey(filename) {
|
|
21
21
|
return filename;
|
|
@@ -159,347 +159,18 @@ function isRuntimeTransformCandidate(candidate) {
|
|
|
159
159
|
return candidate.length > 0 && !candidate.includes("=") && !candidate.includes("<") && !candidate.includes(">") && !candidate.includes("${");
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
|
-
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.ts
|
|
163
|
-
function collectWebpackAssetUserCssMarkers(source) {
|
|
164
|
-
const markers = /* @__PURE__ */ new Set();
|
|
165
|
-
for (const match of source.matchAll(/\.((?:\\.|[_a-z\u00A0-\uFFFF-])(?:\\.|[\w\u00A0-\uFFFF-])*)/gi)) markers.add(`class:${match[1]}`);
|
|
166
|
-
for (const match of source.matchAll(/@(?:-[\w-]+-)?keyframes\s+((?:\\.|[-\w\u00A0-\uFFFF])+)/gi)) markers.add(`keyframes:${match[1]}`);
|
|
167
|
-
try {
|
|
168
|
-
const root = postcss.parse(source);
|
|
169
|
-
root.walkRules((rule) => {
|
|
170
|
-
for (const selector of rule.selectors) if (!/(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i.test(selector)) markers.add(`selector:${selector.trim().replace(/\s+/g, " ")}`);
|
|
171
|
-
rule.walkDecls((decl) => {
|
|
172
|
-
if (decl.prop.startsWith("--")) markers.add(`custom-property:${decl.prop}`);
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
root.walkAtRules("font-face", (rule) => {
|
|
176
|
-
rule.walkDecls("font-family", (decl) => {
|
|
177
|
-
markers.add(`font-face:${decl.value.trim()}`);
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
} catch {}
|
|
181
|
-
return markers;
|
|
182
|
-
}
|
|
183
|
-
//#endregion
|
|
184
162
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.ts
|
|
185
|
-
const WEBPACK_TAILWIND_GENERATED_LAYER_NAMES = /* @__PURE__ */ new Set([
|
|
186
|
-
"theme",
|
|
187
|
-
"base",
|
|
188
|
-
"utilities"
|
|
189
|
-
]);
|
|
190
|
-
const WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE = /(?:^|[^\w-])\.[^,{]{0,512}(?:\\:|\\\[|\\#)/;
|
|
191
|
-
const WEBPACK_TAILWIND_UTILITY_PREFIX_RE = /^\.(?:-?(?:bg|text|border|ring|shadow|drop-shadow|[pmwhz]|px|py|pt|pr|pb|pl|mx|my|mt|mr|mb|ml|min-w|min-h|max-w|max-h|flex|grid|inline|block|hidden|rounded|opacity|translate|scale|rotate|skew|top|right|bottom|left|inset|gap|font|leading|tracking|underline|container)(?:[\-\\{]|$)|\\\[)/;
|
|
192
|
-
const WEBPACK_TAILWIND_BANNER_RE = /tailwindcss v4\./;
|
|
193
|
-
const WEBPACK_TAILWIND_PREFLIGHT_SELECTORS = /* @__PURE__ */ new Set([
|
|
194
|
-
"*",
|
|
195
|
-
":after",
|
|
196
|
-
":before",
|
|
197
|
-
"::after",
|
|
198
|
-
"::before",
|
|
199
|
-
"::backdrop",
|
|
200
|
-
"view",
|
|
201
|
-
"text"
|
|
202
|
-
]);
|
|
203
|
-
const WEBPACK_TAILWIND_PREFLIGHT_PROPS = /* @__PURE__ */ new Set([
|
|
204
|
-
"box-sizing",
|
|
205
|
-
"border",
|
|
206
|
-
"border-width",
|
|
207
|
-
"border-style",
|
|
208
|
-
"border-color",
|
|
209
|
-
"margin",
|
|
210
|
-
"padding"
|
|
211
|
-
]);
|
|
212
|
-
const WEBPACK_TAILWIND_THEME_TOKEN_RE = /^--(?:tw-|color-|spacing|breakpoint-|container-|text-|font-|tracking-|leading-|radius-|shadow-|inset-shadow-|drop-shadow-|ease-|animate-|blur-|perspective-|aspect-|default-)/;
|
|
213
|
-
function parseWebpackCssLayerNames(params) {
|
|
214
|
-
return params.split(",").map((name) => name.trim()).filter(Boolean);
|
|
215
|
-
}
|
|
216
|
-
function removeWebpackTailwindGeneratedAssetCss(source) {
|
|
217
|
-
const cleaned = removeTailwindV4GeneratedUserCssArtifacts(source);
|
|
218
|
-
try {
|
|
219
|
-
const root = postcss.parse(cleaned);
|
|
220
|
-
let changed = false;
|
|
221
|
-
let removingBannerPrefix = false;
|
|
222
|
-
for (const node of [...root.nodes]) {
|
|
223
|
-
if (node.type === "comment" && WEBPACK_TAILWIND_BANNER_RE.test(node.text)) {
|
|
224
|
-
node.remove();
|
|
225
|
-
changed = true;
|
|
226
|
-
removingBannerPrefix = true;
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
if (!removingBannerPrefix) continue;
|
|
230
|
-
if (isWebpackTailwindGeneratedPrefixNode(node)) {
|
|
231
|
-
node.remove();
|
|
232
|
-
changed = true;
|
|
233
|
-
continue;
|
|
234
|
-
}
|
|
235
|
-
removingBannerPrefix = false;
|
|
236
|
-
}
|
|
237
|
-
root.walkAtRules("layer", (rule) => {
|
|
238
|
-
const names = parseWebpackCssLayerNames(rule.params);
|
|
239
|
-
const hasGeneratedLayerName = names.some((name) => WEBPACK_TAILWIND_GENERATED_LAYER_NAMES.has(name));
|
|
240
|
-
const isLayerDeclaration = rule.nodes === void 0;
|
|
241
|
-
const shouldRemoveLayer = isLayerDeclaration ? hasGeneratedLayerName : names.length > 0 && names.every((name) => WEBPACK_TAILWIND_GENERATED_LAYER_NAMES.has(name));
|
|
242
|
-
if (shouldRemoveLayer && isLayerDeclaration) {
|
|
243
|
-
rule.remove();
|
|
244
|
-
changed = true;
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
if (shouldRemoveLayer && !names.includes("utilities")) {
|
|
248
|
-
for (const child of [...rule.nodes ?? []]) if (isWebpackTailwindGeneratedLayerNode(child, names)) {
|
|
249
|
-
child.remove();
|
|
250
|
-
changed = true;
|
|
251
|
-
}
|
|
252
|
-
if (rule.nodes?.length === 0) {
|
|
253
|
-
rule.remove();
|
|
254
|
-
changed = true;
|
|
255
|
-
}
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
if (shouldRemoveLayer) {
|
|
259
|
-
for (const child of [...rule.nodes ?? []]) if (isWebpackTailwindGeneratedLayerNode(child, names)) {
|
|
260
|
-
child.remove();
|
|
261
|
-
changed = true;
|
|
262
|
-
}
|
|
263
|
-
if (rule.nodes?.length === 0) {
|
|
264
|
-
rule.remove();
|
|
265
|
-
changed = true;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
root.walkRules((rule) => {
|
|
270
|
-
if (rule.parent?.type === "atrule" && rule.parent.name === "layer") return;
|
|
271
|
-
const selector = rule.selector.trim();
|
|
272
|
-
if (WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector) || isWebpackTailwindGeneratedPreflightRule(rule)) {
|
|
273
|
-
rule.remove();
|
|
274
|
-
changed = true;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
root.walkComments((comment) => {
|
|
278
|
-
if (WEBPACK_TAILWIND_BANNER_RE.test(comment.text)) {
|
|
279
|
-
comment.remove();
|
|
280
|
-
changed = true;
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
root.walkAtRules((rule) => {
|
|
284
|
-
if (rule.nodes !== void 0 && rule.nodes.length === 0) {
|
|
285
|
-
rule.remove();
|
|
286
|
-
changed = true;
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
return changed ? root.toString() : cleaned;
|
|
290
|
-
} catch {
|
|
291
|
-
return cleaned;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
function isWebpackTailwindGeneratedPrefixNode(node) {
|
|
295
|
-
if (node.type === "rule") return isWebpackTailwindGeneratedRule(node, [
|
|
296
|
-
"theme",
|
|
297
|
-
"base",
|
|
298
|
-
"utilities"
|
|
299
|
-
], true);
|
|
300
|
-
if (node.type !== "atrule") return false;
|
|
301
|
-
const names = node.name === "layer" ? parseWebpackCssLayerNames(node.params) : [];
|
|
302
|
-
if (node.name === "property" && node.params.trim().startsWith("--tw-")) return true;
|
|
303
|
-
if (names.length > 0 && names.every((name) => WEBPACK_TAILWIND_GENERATED_LAYER_NAMES.has(name))) {
|
|
304
|
-
if (node.nodes === void 0) return true;
|
|
305
|
-
return node.nodes.length > 0 && node.nodes.every((child) => isWebpackTailwindGeneratedLayerNode(child, names));
|
|
306
|
-
}
|
|
307
|
-
if (node.nodes === void 0 || node.nodes.length === 0) return false;
|
|
308
|
-
return node.nodes.every((child) => isWebpackTailwindGeneratedPrefixNode(child));
|
|
309
|
-
}
|
|
310
|
-
function isWebpackTailwindGeneratedLayerNode(node, layerNames) {
|
|
311
|
-
if (node.type === "rule") return isWebpackTailwindGeneratedRule(node, layerNames, false);
|
|
312
|
-
if (node.type !== "atrule") return false;
|
|
313
|
-
if (node.name === "property" && node.params.trim().startsWith("--tw-")) return true;
|
|
314
|
-
if (node.nodes === void 0 || node.nodes.length === 0) return false;
|
|
315
|
-
return node.nodes.every((child) => isWebpackTailwindGeneratedLayerNode(child, layerNames));
|
|
316
|
-
}
|
|
317
|
-
function isWebpackTailwindGeneratedRule(rule, layerNames, includePrefix) {
|
|
318
|
-
const selectors = rule.selectors ?? [rule.selector];
|
|
319
|
-
if (selectors.every((selector) => isWebpackTailwindGeneratedUtilitySelector(selector.trim(), includePrefix))) return true;
|
|
320
|
-
if (selectors.every((selector) => isWebpackTailwindGeneratedUtilitySelector(selector.trim(), true))) return true;
|
|
321
|
-
if (layerNames.includes("theme") && isWebpackTailwindGeneratedThemeRule(rule)) return true;
|
|
322
|
-
if (layerNames.includes("base") && isWebpackTailwindGeneratedPreflightRule(rule)) return true;
|
|
323
|
-
return false;
|
|
324
|
-
}
|
|
325
|
-
function isWebpackTailwindGeneratedThemeRule(rule) {
|
|
326
|
-
const declarations = (rule.nodes ?? []).filter((node) => node.type === "decl");
|
|
327
|
-
return declarations.length > 0 && declarations.every((decl) => WEBPACK_TAILWIND_THEME_TOKEN_RE.test(decl.prop) || decl.value.includes("--theme("));
|
|
328
|
-
}
|
|
329
|
-
function isWebpackTailwindGeneratedPreflightRule(rule) {
|
|
330
|
-
const selectors = rule.selectors ?? [rule.selector];
|
|
331
|
-
const declarations = (rule.nodes ?? []).filter((node) => node.type === "decl");
|
|
332
|
-
return selectors.length > 0 && declarations.length > 0 && selectors.every((selector) => {
|
|
333
|
-
const normalized = selector.trim().replace(/\s+/g, " ");
|
|
334
|
-
return WEBPACK_TAILWIND_PREFLIGHT_SELECTORS.has(normalized);
|
|
335
|
-
}) && declarations.every((decl) => WEBPACK_TAILWIND_PREFLIGHT_PROPS.has(decl.prop));
|
|
336
|
-
}
|
|
337
|
-
function isOnlyWebpackTailwindGeneratedPreflightCss(source) {
|
|
338
|
-
try {
|
|
339
|
-
const nodes = postcss.parse(source).nodes ?? [];
|
|
340
|
-
return nodes.length > 0 && nodes.every((node) => {
|
|
341
|
-
if (node.type === "rule") return isWebpackTailwindGeneratedPreflightRule(node);
|
|
342
|
-
return node.type === "atrule" && (node.nodes === void 0 || node.nodes.length === 0);
|
|
343
|
-
});
|
|
344
|
-
} catch {
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
function isWebpackTailwindGeneratedUtilitySelector(selector, includePrefix) {
|
|
349
|
-
return WEBPACK_TAILWIND_UTILITY_RULE_MARKER_RE.test(selector) || includePrefix && WEBPACK_TAILWIND_UTILITY_PREFIX_RE.test(selector);
|
|
350
|
-
}
|
|
351
|
-
function collectWebpackCssRuleIdentityMarkers(source) {
|
|
352
|
-
const markers = /* @__PURE__ */ new Set();
|
|
353
|
-
try {
|
|
354
|
-
const root = postcss.parse(source);
|
|
355
|
-
root.walkRules((rule) => {
|
|
356
|
-
for (const selector of rule.selectors) for (const match of selector.matchAll(/\.((?:\\.|[_a-z\u00A0-\uFFFF-])(?:\\.|[\w\u00A0-\uFFFF-])*)/gi)) markers.add(`class:${match[1]}`);
|
|
357
|
-
});
|
|
358
|
-
root.walkAtRules("keyframes", (rule) => {
|
|
359
|
-
if (rule.params) markers.add(`keyframes:${rule.params}`);
|
|
360
|
-
});
|
|
361
|
-
} catch {}
|
|
362
|
-
return markers;
|
|
363
|
-
}
|
|
364
|
-
function unescapeCssIdentifier(value) {
|
|
365
|
-
return value.replace(/\\([0-9a-f]{1,6}\s?|.)/gi, (_match, escaped) => {
|
|
366
|
-
const hex = escaped.trim();
|
|
367
|
-
if (/^[0-9a-f]+$/i.test(hex)) return String.fromCodePoint(Number.parseInt(hex, 16));
|
|
368
|
-
return escaped;
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
163
|
function collectGeneratedCssRuntimeCandidates(source) {
|
|
372
|
-
const candidates =
|
|
373
|
-
|
|
374
|
-
try {
|
|
375
|
-
postcss.parse(source).walkRules((rule) => {
|
|
376
|
-
for (const selector of rule.selectors) for (const match of selector.matchAll(/\.((?:\\.|[\w\u00A0-\uFFFF-])(?:\\.|[\w\u00A0-\uFFFF-])*)/g)) {
|
|
377
|
-
const candidate = unescapeCssIdentifier(match[1]);
|
|
378
|
-
if (isRuntimeTransformCandidate(candidate)) candidates.add(candidate);
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
} catch {}
|
|
164
|
+
const candidates = collectGeneratedCssClassCandidates(source);
|
|
165
|
+
for (const candidate of candidates) if (!isRuntimeTransformCandidate(candidate)) candidates.delete(candidate);
|
|
382
166
|
return candidates;
|
|
383
167
|
}
|
|
384
|
-
function hasAdditionalWebpackAssetUserCssMarkers(rawSource, generatorRawSource) {
|
|
385
|
-
const rawMarkers = collectWebpackAssetUserCssMarkers(rawSource);
|
|
386
|
-
if (rawMarkers.size === 0) return false;
|
|
387
|
-
const generatorMarkers = collectWebpackAssetUserCssMarkers(generatorRawSource);
|
|
388
|
-
for (const marker of rawMarkers) if (!generatorMarkers.has(marker)) return true;
|
|
389
|
-
return false;
|
|
390
|
-
}
|
|
391
|
-
function hasWebpackTailwindSourceDirectives(source) {
|
|
392
|
-
return Boolean(source) && (hasTailwindRootDirectives(source, { importFallback: true }) || hasTailwindSourceDirectives(source, { importFallback: true }) || hasTailwindApplyDirective(source) || hasTailwindGeneratedCss(source) || hasTailwindGeneratedCssMarkers(source));
|
|
393
|
-
}
|
|
394
168
|
function resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) {
|
|
395
169
|
return styleOptions.cssPreflight ?? compilerOptions.cssPreflight ?? getDefaultCssPreflight();
|
|
396
170
|
}
|
|
397
171
|
function resolveExistingWebpackCssPreflight(compilerOptions, styleOptions, source) {
|
|
398
172
|
return hasMiniProgramPreflightSelector(source) ? resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) : void 0;
|
|
399
173
|
}
|
|
400
|
-
function removeMiniProgramPreflightSelectorRule(source) {
|
|
401
|
-
try {
|
|
402
|
-
const root = postcss.parse(source);
|
|
403
|
-
let changed = false;
|
|
404
|
-
root.walkRules((rule) => {
|
|
405
|
-
const selectors = new Set((rule.selectors ?? [rule.selector]).map((selector) => selector.trim().replace(/^:before$/, "::before").replace(/^:after$/, "::after")));
|
|
406
|
-
if (selectors.has("view") && selectors.has("text") && selectors.has("::before") && selectors.has("::after")) {
|
|
407
|
-
rule.remove();
|
|
408
|
-
changed = true;
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
return changed ? root.toString() : source;
|
|
412
|
-
} catch {
|
|
413
|
-
return source.replace(/(?:^|[}\s])\s*view\s*,\s*text\s*,\s*::after\s*,\s*::before\s*\{[^}]*\}/g, "");
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
function dedupeMiniProgramPreflightSelectorRules(source) {
|
|
417
|
-
try {
|
|
418
|
-
const root = postcss.parse(source);
|
|
419
|
-
let firstRule;
|
|
420
|
-
let changed = false;
|
|
421
|
-
root.walkRules((rule) => {
|
|
422
|
-
const selectors = new Set((rule.selectors ?? [rule.selector]).map((selector) => selector.trim().replace(/^:before$/, "::before").replace(/^:after$/, "::after")));
|
|
423
|
-
if (!selectors.has("view") || !selectors.has("text") || !selectors.has("::before") || !selectors.has("::after")) return;
|
|
424
|
-
if (!firstRule) {
|
|
425
|
-
firstRule = rule;
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
const existingProps = /* @__PURE__ */ new Set();
|
|
429
|
-
firstRule.walkDecls((decl) => {
|
|
430
|
-
existingProps.add(decl.prop);
|
|
431
|
-
});
|
|
432
|
-
rule.walkDecls((decl) => {
|
|
433
|
-
if (!existingProps.has(decl.prop)) {
|
|
434
|
-
firstRule?.append(decl.clone());
|
|
435
|
-
existingProps.add(decl.prop);
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
rule.remove();
|
|
439
|
-
changed = true;
|
|
440
|
-
});
|
|
441
|
-
return changed ? root.toString() : source;
|
|
442
|
-
} catch {
|
|
443
|
-
return source;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function hasMiniProgramPreflightSelector(source) {
|
|
447
|
-
try {
|
|
448
|
-
let found = false;
|
|
449
|
-
postcss.parse(source).walkRules((rule) => {
|
|
450
|
-
const selectors = new Set((rule.selectors ?? [rule.selector]).map((selector) => selector.trim().replace(/^:before$/, "::before").replace(/^:after$/, "::after")));
|
|
451
|
-
if (selectors.has("view") && selectors.has("text") && selectors.has("::before") && selectors.has("::after")) {
|
|
452
|
-
found = true;
|
|
453
|
-
return false;
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
return found;
|
|
457
|
-
} catch {
|
|
458
|
-
return /(?:^|[},])\s*view\s*,\s*text\s*,\s*::after\s*,\s*::before\s*\{/.test(source);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
function ensureWebpackMiniProgramTwContentInit(source) {
|
|
462
|
-
if (!source.includes("var(--tw-content)")) return source;
|
|
463
|
-
try {
|
|
464
|
-
const root = postcss.parse(source);
|
|
465
|
-
let changed = false;
|
|
466
|
-
root.walkRules((rule) => {
|
|
467
|
-
const selectors = new Set((rule.selectors ?? [rule.selector]).map((selector) => selector.trim().replace(/^:before$/, "::before").replace(/^:after$/, "::after")));
|
|
468
|
-
if (!selectors.has("view") || !selectors.has("text") || !selectors.has("::before") || !selectors.has("::after")) return;
|
|
469
|
-
let hasContentInit = false;
|
|
470
|
-
rule.walkDecls("--tw-content", () => {
|
|
471
|
-
hasContentInit = true;
|
|
472
|
-
});
|
|
473
|
-
if (!hasContentInit) {
|
|
474
|
-
rule.append(postcss.decl({
|
|
475
|
-
prop: "--tw-content",
|
|
476
|
-
value: "''"
|
|
477
|
-
}));
|
|
478
|
-
changed = true;
|
|
479
|
-
}
|
|
480
|
-
return false;
|
|
481
|
-
});
|
|
482
|
-
return changed ? root.toString() : source;
|
|
483
|
-
} catch {
|
|
484
|
-
return source;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function removeTailwindV4StandaloneHostPreflightRule(source) {
|
|
488
|
-
if (!source.includes("--theme(")) return source;
|
|
489
|
-
try {
|
|
490
|
-
const root = postcss.parse(source);
|
|
491
|
-
let changed = false;
|
|
492
|
-
root.walkRules((rule) => {
|
|
493
|
-
if (rule.selector.trim() !== ":host") return;
|
|
494
|
-
if (!rule.nodes?.some((node) => node.type === "decl" && node.value?.includes("--theme("))) return;
|
|
495
|
-
rule.remove();
|
|
496
|
-
changed = true;
|
|
497
|
-
});
|
|
498
|
-
return changed ? root.toString() : source;
|
|
499
|
-
} catch {
|
|
500
|
-
return source;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
174
|
function collectRuntimeTokenSignatureParts(source) {
|
|
504
175
|
return source.match(/[\w-]+_[A-Z][\w-]*/gi) ?? [];
|
|
505
176
|
}
|
|
@@ -536,9 +207,6 @@ function pruneMapToMaxSize(map, maxSize) {
|
|
|
536
207
|
map.delete(oldestKey);
|
|
537
208
|
}
|
|
538
209
|
}
|
|
539
|
-
function stripTrailingLineWhitespace(source) {
|
|
540
|
-
return source.replace(/[ \t]+$/gm, "");
|
|
541
|
-
}
|
|
542
210
|
function pruneWebpackCssHandlerOptionCaches(cssHandlerOptionsCache, cssUserHandlerOptionsCache, activeCssFiles) {
|
|
543
211
|
const activeSuffixes = [...activeCssFiles].map((file) => `:${file}`);
|
|
544
212
|
for (const key of cssHandlerOptionsCache.keys()) if (!activeSuffixes.some((suffix) => key.endsWith(suffix))) cssHandlerOptionsCache.delete(key);
|
|
@@ -610,14 +278,15 @@ function includesTailwindPreflightImport(source) {
|
|
|
610
278
|
function finalizeMiniProgramUserCssAssetSource(source, compilerOptions, isWebGeneratorTarget, options = {}) {
|
|
611
279
|
const styleOptions = resolveStyleOptionsFromContext(compilerOptions);
|
|
612
280
|
if (isWebGeneratorTarget) return source;
|
|
613
|
-
const
|
|
281
|
+
const finalized = finalizeMiniProgramCss$1(removeMiniProgramInteractiveSelectors(source, {
|
|
614
282
|
active: styleOptions.cssRemoveActivePseudoClass ?? true,
|
|
615
283
|
hover: styleOptions.cssRemoveHoverPseudoClass ?? true
|
|
616
284
|
}), {
|
|
617
285
|
cssPreflight: options.cssPreflight === false ? false : !hasMiniProgramTailwindV4PreflightReset(source) ? resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) : void 0,
|
|
618
286
|
isTailwindcssV4: true,
|
|
619
287
|
tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
|
|
620
|
-
})
|
|
288
|
+
});
|
|
289
|
+
const output = removeTailwindV4StandaloneHostPreflightRule(finalized);
|
|
621
290
|
return stripMiniProgramCssSpecificityPlaceholders(output);
|
|
622
291
|
}
|
|
623
292
|
function shouldFallbackToWebpackUserCssOnGeneratorError(options) {
|
|
@@ -656,7 +325,7 @@ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTa
|
|
|
656
325
|
} catch {}
|
|
657
326
|
const shouldRemoveExistingPreflight = options.cssPreflight === false && options.preserveExistingPreflight === false;
|
|
658
327
|
if (shouldRemoveExistingPreflight) finalized = removeMiniProgramPreflightSelectorRule(finalized);
|
|
659
|
-
const hasExistingMiniProgramPreflight = options.preserveExistingPreflight !== false && hasMiniProgramPreflightSelector(source);
|
|
328
|
+
const hasExistingMiniProgramPreflight = options.preserveExistingPreflight !== false && hasMiniProgramPreflightSelector$1(source);
|
|
660
329
|
finalized = finalizeMiniProgramCss$1(finalized, {
|
|
661
330
|
cssPreflight: options.cssPreflight === false && !hasExistingMiniProgramPreflight ? false : !hasMiniProgramTailwindV4PreflightReset(finalized) ? resolveExistingWebpackCssPreflight(compilerOptions, styleOptions, source) : void 0,
|
|
662
331
|
isTailwindcssV4: true,
|
|
@@ -739,7 +408,7 @@ function dirnameWebpackResourcePath(file) {
|
|
|
739
408
|
return path.dirname(file);
|
|
740
409
|
}
|
|
741
410
|
function resolveWebpackCssAssetModuleResource(resource, issuer, options) {
|
|
742
|
-
if (!isCssLikeModuleResource(resource, options.cssMatcher
|
|
411
|
+
if (!isCssLikeModuleResource(resource, options.cssMatcher)) return;
|
|
743
412
|
const normalized = stripResourceQuery(resource);
|
|
744
413
|
if (!normalized) return;
|
|
745
414
|
const absoluteResource = resolveWebpackResourcePath(normalized);
|
|
@@ -847,73 +516,8 @@ function shouldUseWebpackAssetAsGeneratorUserCss(rawSource, generatorRawSource,
|
|
|
847
516
|
const rawMarkers = collectWebpackAssetUserCssMarkers(rawSource);
|
|
848
517
|
return rawSource !== generatorRawSource && (options.processed === true || !rawSource.includes("data:")) && !hasTailwindRootDirectives(rawSource, { importFallback: true }) && !hasTailwindSourceDirectives(rawSource, { importFallback: true }) && !hasTailwindApplyDirective(rawSource) && rawMarkers.size > 0 && !isOnlyWebpackTailwindGeneratedPreflightCss(rawSource) && (!hasTailwindGeneratedCssMarkers(rawSource) || hasAdditionalWebpackAssetUserCssMarkers(rawSource, generatorRawSource));
|
|
849
518
|
}
|
|
850
|
-
function hasWebpackClassSelector(selector) {
|
|
851
|
-
return /(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i.test(selector);
|
|
852
|
-
}
|
|
853
|
-
function isWebpackKeyframesRule(rule) {
|
|
854
|
-
let parent = rule.parent;
|
|
855
|
-
while (parent) {
|
|
856
|
-
if (parent.type === "atrule" && parent.name.endsWith("keyframes")) return true;
|
|
857
|
-
parent = parent.parent;
|
|
858
|
-
}
|
|
859
|
-
return false;
|
|
860
|
-
}
|
|
861
|
-
function collectWebpackBareSelectorUserCss(source) {
|
|
862
|
-
try {
|
|
863
|
-
const normalizedSource = removeTailwindSourceDirectives(stripTailwindSourceMediaFragments(removeTailwindV4GeneratorAtRules(source)), { importFallback: true });
|
|
864
|
-
const root = postcss.parse(normalizedSource);
|
|
865
|
-
let changed = false;
|
|
866
|
-
root.walkAtRules((rule) => {
|
|
867
|
-
if (rule.name === "import" || rule.name === "font-face" || rule.name.endsWith("keyframes")) {
|
|
868
|
-
rule.remove();
|
|
869
|
-
changed = true;
|
|
870
|
-
}
|
|
871
|
-
});
|
|
872
|
-
root.walkRules((rule) => {
|
|
873
|
-
if (isWebpackKeyframesRule(rule) || rule.selectors.some((selector) => hasWebpackClassSelector(selector))) {
|
|
874
|
-
rule.remove();
|
|
875
|
-
changed = true;
|
|
876
|
-
}
|
|
877
|
-
});
|
|
878
|
-
root.walkAtRules((rule) => {
|
|
879
|
-
if (rule.nodes !== void 0 && rule.nodes.length === 0) {
|
|
880
|
-
rule.remove();
|
|
881
|
-
changed = true;
|
|
882
|
-
}
|
|
883
|
-
});
|
|
884
|
-
return changed ? root.toString() : normalizedSource;
|
|
885
|
-
} catch {
|
|
886
|
-
return "";
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
519
|
//#endregion
|
|
890
520
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.ts
|
|
891
|
-
function isWebpackTailwindImportRequest(request) {
|
|
892
|
-
return request === "tailwindcss" || request === "tailwindcss4" || request?.startsWith("tailwindcss/") || request?.startsWith("tailwindcss4/") || request === "weapp-tailwindcss" || request?.startsWith("weapp-tailwindcss/");
|
|
893
|
-
}
|
|
894
|
-
function removeWebpackGeneratorNonTailwindImports(source) {
|
|
895
|
-
if (!source?.includes("@import")) return source;
|
|
896
|
-
try {
|
|
897
|
-
const root = postcss.parse(source);
|
|
898
|
-
let changed = false;
|
|
899
|
-
root.walkAtRules("import", (rule) => {
|
|
900
|
-
if (isWebpackTailwindImportRequest(parseImportRequest(rule.params))) return;
|
|
901
|
-
rule.remove();
|
|
902
|
-
changed = true;
|
|
903
|
-
});
|
|
904
|
-
return changed ? root.toString() : source;
|
|
905
|
-
} catch {
|
|
906
|
-
return source;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
function isWebpackCssSourceRepresentedInAsset(rawSource, sourceCss) {
|
|
910
|
-
if (!sourceCss || !hasWebpackTailwindSourceDirectives(sourceCss)) return false;
|
|
911
|
-
const sourceMarkers = collectWebpackCssRuleIdentityMarkers(sourceCss);
|
|
912
|
-
if (sourceMarkers.size === 0) return false;
|
|
913
|
-
const rawMarkers = collectWebpackCssRuleIdentityMarkers(rawSource);
|
|
914
|
-
for (const marker of sourceMarkers) if (!rawMarkers.has(marker)) return false;
|
|
915
|
-
return true;
|
|
916
|
-
}
|
|
917
521
|
function createWebpackGeneratorCssSource(file, css) {
|
|
918
522
|
if (!file || !css || !hasWebpackTailwindSourceDirectives(css)) return;
|
|
919
523
|
return {
|
|
@@ -948,24 +552,6 @@ function createWebpackUserCssSourceAppend(sources, generatorRawSource, currentSo
|
|
|
948
552
|
processed: matchedSources.every((source) => source.processed)
|
|
949
553
|
} : void 0;
|
|
950
554
|
}
|
|
951
|
-
function createWebpackGeneratorUserCssSourceAppend(...sources) {
|
|
952
|
-
const parts = sources.filter((source) => source !== void 0 && source.css.trim().length > 0);
|
|
953
|
-
if (parts.length === 0) return;
|
|
954
|
-
let css = "";
|
|
955
|
-
const usedParts = [];
|
|
956
|
-
for (const source of parts) {
|
|
957
|
-
const merged = css.trim().length > 0 ? mergeCoveredCssRuleDeclarations(css, source.css) : void 0;
|
|
958
|
-
if (merged?.changed) css = merged.baseCss;
|
|
959
|
-
const nextCss = css.trim().length > 0 ? filterExistingCssRules(css, merged?.css ?? source.css) : source.css;
|
|
960
|
-
if (!(nextCss.trim().length > 0)) continue;
|
|
961
|
-
css = createCssSourceOrderAppend(css, nextCss);
|
|
962
|
-
usedParts.push(source);
|
|
963
|
-
}
|
|
964
|
-
return {
|
|
965
|
-
css,
|
|
966
|
-
processed: usedParts.every((source) => source.processed)
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
555
|
//#endregion
|
|
970
556
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.ts
|
|
971
557
|
function normalizeWebpackCssSourceRef(file) {
|
|
@@ -1460,18 +1046,19 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1460
1046
|
const shouldPreserveGeneratedWebAssetUserCss = isWebGeneratorTarget && currentAssetLooksGenerated && !currentAssetHasBundlerGeneratedMarker && !currentAssetHasAdditionalUserCss;
|
|
1461
1047
|
const hasExplicitSourceCssForCurrentAsset = sourceCss !== void 0 && (hasTailwindRootDirectives(sourceCss, { importFallback: true }) || hasTailwindSourceDirectives(sourceCss, { importFallback: true }) || hasTailwindApplyDirective(sourceCss));
|
|
1462
1048
|
const currentAssetHasUserCss = (sourceCssProcessed || hasExplicitSourceCssForCurrentAsset) && currentAssetLooksGenerated && !shouldPreserveGeneratedWebAssetUserCss ? currentAssetHasAdditionalUserCss : shouldUseWebpackAssetAsGeneratorUserCss(currentAssetUserCssSource, generatorRawSource, { processed: sourceCssProcessed || shouldPreserveGeneratedWebAssetUserCss });
|
|
1049
|
+
const shouldAppendCurrentAssetUserCss = shouldAppendCurrentWebpackAssetUserCss({
|
|
1050
|
+
currentAssetHasBundlerGeneratedMarker,
|
|
1051
|
+
currentAssetHasUserCss,
|
|
1052
|
+
currentAssetLooksGenerated,
|
|
1053
|
+
registeredUserRawSource,
|
|
1054
|
+
shouldPreserveGeneratedWebAssetUserCss,
|
|
1055
|
+
sourceCssProcessed
|
|
1056
|
+
});
|
|
1463
1057
|
const userRawSource = createWebpackGeneratorUserCssSourceAppend(createWebpackCurrentAssetUserRawSource({
|
|
1464
1058
|
currentAssetHasUserCss,
|
|
1465
1059
|
currentAssetLooksGenerated,
|
|
1466
1060
|
currentAssetUserCssSource,
|
|
1467
|
-
shouldAppendCurrentAssetUserCss
|
|
1468
|
-
currentAssetHasBundlerGeneratedMarker,
|
|
1469
|
-
currentAssetHasUserCss,
|
|
1470
|
-
currentAssetLooksGenerated,
|
|
1471
|
-
registeredUserRawSource,
|
|
1472
|
-
shouldPreserveGeneratedWebAssetUserCss,
|
|
1473
|
-
sourceCssProcessed
|
|
1474
|
-
}),
|
|
1061
|
+
shouldAppendCurrentAssetUserCss,
|
|
1475
1062
|
sourceCssProcessed
|
|
1476
1063
|
}), registeredUserRawSource);
|
|
1477
1064
|
if (isPureLocalCssImportWrapper(currentRawSource)) return { result: new ConcatSource(removeTailwindSourceDirectives(stripBundlerGeneratedCssMarkers(currentRawSource), { importFallback: true })) };
|
|
@@ -2013,7 +1600,7 @@ function compactSnapshot(snapshot) {
|
|
|
2013
1600
|
};
|
|
2014
1601
|
}
|
|
2015
1602
|
function normalizeChangedFiles(changedFiles) {
|
|
2016
|
-
return new Set([...changedFiles ?? []].map((file) => resolveSourceScanPath(file)));
|
|
1603
|
+
return new Set([...changedFiles ?? []].map((file) => (0, source_scan_exports.resolveSourceScanPath)(file)));
|
|
2017
1604
|
}
|
|
2018
1605
|
async function resolveScanFileSnapshot(file) {
|
|
2019
1606
|
try {
|
|
@@ -2045,7 +1632,7 @@ async function resolveScanFiles(roots, outDir) {
|
|
|
2045
1632
|
outDir,
|
|
2046
1633
|
root: root.root
|
|
2047
1634
|
});
|
|
2048
|
-
for (const file of rootFiles) files.add(resolveSourceScanPath(file));
|
|
1635
|
+
for (const file of rootFiles) files.add((0, source_scan_exports.resolveSourceScanPath)(file));
|
|
2049
1636
|
}));
|
|
2050
1637
|
return files;
|
|
2051
1638
|
}
|
|
@@ -2493,7 +2080,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2493
2080
|
onUpdate: compilerOptions.onUpdate,
|
|
2494
2081
|
debug
|
|
2495
2082
|
});
|
|
2496
|
-
for (const [file, asset] of groupedEntries.css) updateAssetIfChanged(file, finalizeWebpackCssAssetOutputSource(
|
|
2083
|
+
for (const [file, asset] of groupedEntries.css) updateAssetIfChanged(file, finalizeWebpackCssAssetOutputSource((compilation.getAsset(file)?.source.source() ?? asset.source()).toString(), compilerOptions, isWebGeneratorTarget));
|
|
2497
2084
|
});
|
|
2498
2085
|
});
|
|
2499
2086
|
}
|
|
@@ -2712,7 +2299,7 @@ function addMpxWebpackPluginAlias(alias, pkgDir) {
|
|
|
2712
2299
|
}
|
|
2713
2300
|
];
|
|
2714
2301
|
const managedNames = new Set(entries.filter((entry) => typeof entry.name === "string").map((entry) => entry.name));
|
|
2715
|
-
const managedPatterns = new Set(entries.
|
|
2302
|
+
const managedPatterns = new Set(entries.flatMap((entry) => entry.name instanceof RegExp ? [`${entry.name.source}/${entry.name.flags}`] : []));
|
|
2716
2303
|
for (let index = alias.length - 1; index >= 0; index--) {
|
|
2717
2304
|
const name = alias[index]?.name;
|
|
2718
2305
|
if (managedNames.has(name) || name instanceof RegExp && managedPatterns.has(`${name.source}/${name.flags}`)) alias.splice(index, 1);
|
|
@@ -2993,7 +2580,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
2993
2580
|
const isLynxMainThreadCss = compilerOptions.platform === "lynx" && (module.layer === "react:main-thread" || loaderEntries.some((entry) => entry.loader?.includes?.("ignore-css-loader")));
|
|
2994
2581
|
let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
2995
2582
|
const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
|
|
2996
|
-
const isCssModule = isCssLikeModuleResource(module.resource, compilerOptions.cssMatcher
|
|
2583
|
+
const isCssModule = isCssLikeModuleResource(module.resource, compilerOptions.cssMatcher);
|
|
2997
2584
|
if (isCssModule) {
|
|
2998
2585
|
const frameworkPostcssOptions = collectFrameworkPostcssOptionsFromLoaderEntries(loaderEntries, _loaderContext);
|
|
2999
2586
|
if (frameworkPostcssOptions) captureResolvedFrameworkPostcssOptions(compilerOptions, frameworkPostcssOptions);
|
|
@@ -3024,7 +2611,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
3024
2611
|
if (cssImportRewriteLoaderOptions && runtimeCssImportRewriteLoaderExists && runtimeCssImportRewriteLoader && isCssModule && !isLynxMainThreadCss) {
|
|
3025
2612
|
const existingIndex = loaderEntries.findIndex((entry) => entry.loader?.includes?.(runtimeCssImportRewriteLoader));
|
|
3026
2613
|
const existingOptions = existingIndex === -1 ? void 0 : loaderEntries[existingIndex]?.options;
|
|
3027
|
-
const generateInRegisteredLoader = typeof existingOptions === "object" && existingOptions !== null && "generateCss" in existingOptions && existingOptions
|
|
2614
|
+
const generateInRegisteredLoader = typeof existingOptions === "object" && existingOptions !== null && "generateCss" in existingOptions && existingOptions["generateCss"] === true;
|
|
3028
2615
|
const rewriteLoaderEntry = existingIndex !== -1 ? {
|
|
3029
2616
|
...loaderEntries.splice(existingIndex, 1)[0],
|
|
3030
2617
|
loader: runtimeCssImportRewriteLoader,
|
|
@@ -3091,6 +2678,7 @@ function appendIgnoredPath(ignored, ignoredPath) {
|
|
|
3091
2678
|
return createOutputIgnoredPredicate(normalizeIgnoredList(ignored), ignoredPath);
|
|
3092
2679
|
}
|
|
3093
2680
|
function setupWebpackWatchOutputIgnore(compiler) {
|
|
2681
|
+
const compilerOptions = compiler.options;
|
|
3094
2682
|
const appendOutputIgnoredPath = (watchOptions, outputPath) => {
|
|
3095
2683
|
const resolvedOutputPath = outputPath || compiler.outputPath || compiler.options?.output?.path;
|
|
3096
2684
|
const paths = resolvedOutputPath && path.win32.isAbsolute(resolvedOutputPath) && !path.posix.isAbsolute(resolvedOutputPath) ? path.win32 : path;
|
|
@@ -3104,8 +2692,8 @@ function setupWebpackWatchOutputIgnore(compiler) {
|
|
|
3104
2692
|
}
|
|
3105
2693
|
return { ignored: appendIgnoredPath(void 0, outputDir) };
|
|
3106
2694
|
};
|
|
3107
|
-
const compilerWatchOptions = appendOutputIgnoredPath(
|
|
3108
|
-
if (compilerWatchOptions)
|
|
2695
|
+
const compilerWatchOptions = appendOutputIgnoredPath(compilerOptions.watchOptions);
|
|
2696
|
+
if (compilerWatchOptions) compilerOptions.watchOptions = compilerWatchOptions;
|
|
3109
2697
|
const syncOutputIgnoredPath = () => {
|
|
3110
2698
|
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
3111
2699
|
const watchOptions = compiler.watching?.watchOptions;
|
|
@@ -3117,8 +2705,8 @@ function setupWebpackWatchOutputIgnore(compiler) {
|
|
|
3117
2705
|
const watchOptions = compiler.watching?.watchOptions;
|
|
3118
2706
|
if (watchOptions) appendOutputIgnoredPath(watchOptions, outputPath);
|
|
3119
2707
|
else {
|
|
3120
|
-
const compilerWatchOptions = appendOutputIgnoredPath(
|
|
3121
|
-
if (compilerWatchOptions)
|
|
2708
|
+
const compilerWatchOptions = appendOutputIgnoredPath(compilerOptions.watchOptions, outputPath);
|
|
2709
|
+
if (compilerWatchOptions) compilerOptions.watchOptions = compilerWatchOptions;
|
|
3122
2710
|
}
|
|
3123
2711
|
});
|
|
3124
2712
|
}
|
|
@@ -3263,7 +2851,7 @@ var WebpackFrameworkPlugin = class {
|
|
|
3263
2851
|
const file = path.resolve(source.file);
|
|
3264
2852
|
const previous = webpackCssSources.get(file);
|
|
3265
2853
|
const next = {
|
|
3266
|
-
css: typeof source.css === "string" ? normalizeTailwindConfigDirectives(source.css, path.dirname(file)) : source.css,
|
|
2854
|
+
css: typeof source.css === "string" ? normalizeTailwindConfigDirectives$1(source.css, path.dirname(file)) : source.css,
|
|
3267
2855
|
processed: source.processed
|
|
3268
2856
|
};
|
|
3269
2857
|
if (previous && shouldKeepPreviousWebpackCssSource(previous, next)) {
|