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.js
CHANGED
|
@@ -2562,8 +2562,8 @@ function detectRouter(resourcePath) {
|
|
|
2562
2562
|
var NEXT_RSC_ENTRIES = /(?:^|[\\/])(?:layout|page|loading|error|not-found|template|default)\.[jt]sx?$/;
|
|
2563
2563
|
function isSkippable(resourcePath) {
|
|
2564
2564
|
const normalized = resourcePath.replace(/\\/g, "/");
|
|
2565
|
-
return normalized.includes("/node_modules/") || normalized.endsWith(".d.ts") || normalized.endsWith(".d.mts") || normalized.endsWith(".d.cts") || // Skip
|
|
2566
|
-
/\.(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,
|
|
2565
|
+
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)
|
|
2566
|
+
/\.(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,
|
|
2567
2567
|
// jadi guard ini menggantikan NEXT_RSC_ENTRIES exclude yang ada di webpack path.
|
|
2568
2568
|
NEXT_RSC_ENTRIES.test(normalized);
|
|
2569
2569
|
}
|
|
@@ -2672,7 +2672,11 @@ function writePerFileSafelist(safelistPath, resourcePath, classes) {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
function turbopackLoader(source, options = {}) {
|
|
2675
|
-
if (isSkippable(this.resourcePath))
|
|
2675
|
+
if (isSkippable(this.resourcePath)) {
|
|
2676
|
+
const isRscEntry = NEXT_RSC_ENTRIES.test(this.resourcePath.replace(/\\/g, "/"));
|
|
2677
|
+
const hasUseClient = /^\s*["'](use client)["']/.test(source);
|
|
2678
|
+
if (!isRscEntry || !hasUseClient) return source;
|
|
2679
|
+
}
|
|
2676
2680
|
const router = detectRouter(this.resourcePath);
|
|
2677
2681
|
const nextMajor = parseNum(options.nextMajor);
|
|
2678
2682
|
const debug = parseBool(options.debug);
|