tailwind-styled-v4 5.0.20 → 5.0.22
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/engine.js +12 -2
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +12 -2
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +12 -2
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +12 -2
- package/dist/next.mjs.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/shared.js +12 -2
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +12 -2
- package/dist/shared.mjs.map +1 -1
- package/dist/turbopackLoader.js +7 -3
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +7 -3
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/vite.js +12 -2
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +12 -2
- package/dist/vite.mjs.map +1 -1
- package/package.json +1 -1
package/dist/turbopackLoader.mjs
CHANGED
|
@@ -2540,8 +2540,8 @@ function detectRouter(resourcePath) {
|
|
|
2540
2540
|
var NEXT_RSC_ENTRIES = /(?:^|[\\/])(?:layout|page|loading|error|not-found|template|default)\.[jt]sx?$/;
|
|
2541
2541
|
function isSkippable(resourcePath) {
|
|
2542
2542
|
const normalized = resourcePath.replace(/\\/g, "/");
|
|
2543
|
-
return normalized.includes("/node_modules/") || normalized.endsWith(".d.ts") || normalized.endsWith(".d.mts") || normalized.endsWith(".d.cts") || // Skip
|
|
2544
|
-
/\.(css|scss|sass|less|svg|png|jpg|jpeg|gif|webp|ico|woff|woff2|ttf|eot)$/.test(normalized) || // Skip Next.js RSC entry files — Turbopack tidak punya exclude di rule level,
|
|
2543
|
+
return normalized.includes("/node_modules/") || normalized.endsWith(".d.ts") || normalized.endsWith(".d.mts") || normalized.endsWith(".d.cts") || // Skip non-JS files that Turbopack may pass to the loader (no rule-level exclude)
|
|
2544
|
+
/\.(css|scss|sass|less|svg|png|jpg|jpeg|gif|webp|ico|woff|woff2|ttf|eot|md|mdx|txt|yaml|yml|json|tsbuildinfo)$/.test(normalized) || // Skip Next.js RSC entry files — Turbopack tidak punya exclude di rule level,
|
|
2545
2545
|
// jadi guard ini menggantikan NEXT_RSC_ENTRIES exclude yang ada di webpack path.
|
|
2546
2546
|
NEXT_RSC_ENTRIES.test(normalized);
|
|
2547
2547
|
}
|
|
@@ -2650,7 +2650,11 @@ function writePerFileSafelist(safelistPath, resourcePath, classes) {
|
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
2652
|
function turbopackLoader(source, options = {}) {
|
|
2653
|
-
if (isSkippable(this.resourcePath))
|
|
2653
|
+
if (isSkippable(this.resourcePath)) {
|
|
2654
|
+
const isRscEntry = NEXT_RSC_ENTRIES.test(this.resourcePath.replace(/\\/g, "/"));
|
|
2655
|
+
const hasUseClient = /^\s*["'](use client)["']/.test(source);
|
|
2656
|
+
if (!isRscEntry || !hasUseClient) return source;
|
|
2657
|
+
}
|
|
2654
2658
|
const router = detectRouter(this.resourcePath);
|
|
2655
2659
|
const nextMajor = parseNum(options.nextMajor);
|
|
2656
2660
|
const debug = parseBool(options.debug);
|