cloudflare-next-intl 0.9.33 → 0.9.34
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.
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { extractImportSpecifiers, resolveLocalImport } from './resolve_local_imports.js';
|
|
2
2
|
export const MAX_FILES_VISITED = 300;
|
|
3
|
-
const USE_SERVER_DIRECTIVE = /^(?:\s*['"]use \w[\w-]*['"]\s*;?\s*)*['"]use server['"]\s*;?/;
|
|
4
|
-
function hasLeadingUseServerDirective(source) {
|
|
5
|
-
return USE_SERVER_DIRECTIVE.test(source);
|
|
6
|
-
}
|
|
7
3
|
export function collectReachableFiles(entryFile, entrySource, aliases, io) {
|
|
8
4
|
const isFile = io.isFile ?? (() => false);
|
|
9
5
|
const files = new Map([[entryFile, entrySource]]);
|
|
@@ -26,8 +22,6 @@ export function collectReachableFiles(entryFile, entrySource, aliases, io) {
|
|
|
26
22
|
catch {
|
|
27
23
|
continue;
|
|
28
24
|
}
|
|
29
|
-
if (hasLeadingUseServerDirective(importedSource))
|
|
30
|
-
continue;
|
|
31
25
|
files.set(resolved, importedSource);
|
|
32
26
|
queue.push(resolved);
|
|
33
27
|
}
|