@ecopages/react 0.2.0-rc.7 → 0.2.0-rc.8
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/package.json +4 -4
- package/src/app/client-only.js +3 -8
- package/src/client-graph/ast-transform-eco-page.d.ts +10 -0
- package/src/client-graph/ast-transform-eco-page.js +71 -0
- package/src/client-graph/ast-transform-import-edits.d.ts +13 -0
- package/src/client-graph/ast-transform-import-edits.js +75 -0
- package/src/client-graph/ast-transform-walk-imports.d.ts +19 -0
- package/src/client-graph/ast-transform-walk-imports.js +103 -0
- package/src/client-graph/ast-transform.d.ts +1 -7
- package/src/client-graph/ast-transform.js +42 -379
- package/src/client-graph/ast-walk.d.ts +10 -0
- package/src/client-graph/ast-walk.js +26 -0
- package/src/client-graph/boundary-plugin-read-file-inline.d.ts +8 -0
- package/src/client-graph/boundary-plugin-read-file-inline.js +45 -0
- package/src/client-graph/boundary-plugin-transform.d.ts +18 -0
- package/src/client-graph/boundary-plugin-transform.js +61 -0
- package/src/client-graph/boundary-plugin.d.ts +0 -20
- package/src/client-graph/boundary-plugin.js +16 -98
- package/src/client-graph/reachability-analyzer.d.ts +2 -43
- package/src/client-graph/reachability-analyzer.js +20 -518
- package/src/client-graph/reachability-client-roots.d.ts +8 -0
- package/src/client-graph/reachability-client-roots.js +59 -0
- package/src/client-graph/reachability-export-names.d.ts +5 -0
- package/src/client-graph/reachability-export-names.js +34 -0
- package/src/client-graph/reachability-fallback-roots.d.ts +3 -0
- package/src/client-graph/reachability-fallback-roots.js +71 -0
- package/src/client-graph/reachability-preload.d.ts +10 -0
- package/src/client-graph/reachability-preload.js +30 -0
- package/src/client-graph/reachability-top-level-index.d.ts +14 -0
- package/src/client-graph/reachability-top-level-index.js +93 -0
- package/src/client-graph/reachability-traverse.d.ts +7 -0
- package/src/client-graph/reachability-traverse.js +201 -0
- package/src/hmr/hmr-strategy-process.d.ts +34 -0
- package/src/hmr/hmr-strategy-process.js +83 -0
- package/src/hmr/hmr-strategy.d.ts +1 -0
- package/src/hmr/hmr-strategy.js +42 -84
- package/src/hydration/browser/page-hydration-hmr.d.ts +11 -0
- package/src/hydration/browser/page-hydration-hmr.js +56 -0
- package/src/hydration/browser/page-hydration-module.d.ts +8 -0
- package/src/hydration/browser/page-hydration-module.js +17 -0
- package/src/hydration/browser/page-hydration.d.ts +2 -18
- package/src/hydration/browser/page-hydration.js +3 -80
- package/src/hydration/compiled-page-hydration-options.d.ts +20 -0
- package/src/hydration/compiled-page-hydration-options.js +1 -0
- package/src/hydration/hydration-lifecycle.test.browser.js +12 -11
- package/src/hydration/hydration-page-entry-source.d.ts +5 -0
- package/src/hydration/hydration-page-entry-source.js +87 -0
- package/src/hydration/hydration-script-compiler.d.ts +2 -20
- package/src/hydration/hydration-script-compiler.js +14 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecopages/react",
|
|
3
|
-
"version": "0.2.0-rc.
|
|
3
|
+
"version": "0.2.0-rc.8",
|
|
4
4
|
"description": "React integration for Ecopages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecopages",
|
|
@@ -104,16 +104,16 @@
|
|
|
104
104
|
"directory": "packages/integrations/react"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@ecopages/core": "0.2.0-rc.
|
|
107
|
+
"@ecopages/core": "0.2.0-rc.8",
|
|
108
108
|
"@types/react": "^19",
|
|
109
109
|
"@types/react-dom": "^19",
|
|
110
110
|
"react": "^19",
|
|
111
111
|
"react-dom": "^19"
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@ecopages/file-system": "0.2.0-rc.
|
|
114
|
+
"@ecopages/file-system": "0.2.0-rc.8",
|
|
115
115
|
"@ecopages/logger": "^0.2.3",
|
|
116
|
-
"@ecopages/mdx": "0.2.0-rc.
|
|
116
|
+
"@ecopages/mdx": "0.2.0-rc.8",
|
|
117
117
|
"@mdx-js/mdx": "^3.1.1",
|
|
118
118
|
"oxc-parser": "^0.141.0",
|
|
119
119
|
"oxc-transform": "^0.141.0",
|
package/src/app/client-only.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
useEffect(() => {
|
|
5
|
-
setIsClient(true);
|
|
6
|
-
}, []);
|
|
7
|
-
return isClient;
|
|
8
|
-
};
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
const emptySubscribe = () => () => { };
|
|
3
|
+
export const useIsClient = () => useSyncExternalStore(emptySubscribe, () => true, () => false);
|
|
9
4
|
export const ClientOnly = ({ children, fallback = null }) => {
|
|
10
5
|
const isClient = useIsClient();
|
|
11
6
|
if (!isClient) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips server-only `eco.page(...)` option keys from browser-bound modules.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Removes server-only `eco.page(...)` options from browser-bound modules.
|
|
6
|
+
*/
|
|
7
|
+
export declare function stripServerOnlyEcoPageOptions(source: string, program: any): {
|
|
8
|
+
transformed: string;
|
|
9
|
+
modified: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips server-only `eco.page(...)` option keys from browser-bound modules.
|
|
3
|
+
*/
|
|
4
|
+
import { walkAstNodes } from './ast-walk.js';
|
|
5
|
+
import { applySourceEdits } from './ast-transform-import-edits.js';
|
|
6
|
+
const SERVER_ONLY_ECO_PAGE_OPTION_KEYS = new Set([
|
|
7
|
+
'cache',
|
|
8
|
+
'middleware',
|
|
9
|
+
'dependencies',
|
|
10
|
+
'requires',
|
|
11
|
+
'metadata',
|
|
12
|
+
'staticProps',
|
|
13
|
+
'staticPaths',
|
|
14
|
+
]);
|
|
15
|
+
function isEcoPageOptionsCall(node) {
|
|
16
|
+
return (node.type === 'CallExpression' &&
|
|
17
|
+
node.callee?.type === 'MemberExpression' &&
|
|
18
|
+
node.callee.object?.type === 'Identifier' &&
|
|
19
|
+
node.callee.object.name === 'eco' &&
|
|
20
|
+
node.callee.property?.type === 'Identifier' &&
|
|
21
|
+
node.callee.property.name === 'page' &&
|
|
22
|
+
node.arguments?.[0]?.type === 'ObjectExpression');
|
|
23
|
+
}
|
|
24
|
+
function collectEcoPageOptionStripEdit(node, source, edits) {
|
|
25
|
+
if (!isEcoPageOptionsCall(node))
|
|
26
|
+
return;
|
|
27
|
+
const objectExpression = node.arguments[0];
|
|
28
|
+
const keptProperties = [];
|
|
29
|
+
let removedProperty = false;
|
|
30
|
+
for (const property of objectExpression.properties ?? []) {
|
|
31
|
+
if (property?.type === 'Property') {
|
|
32
|
+
const keyName = getObjectPropertyKeyName(property.key);
|
|
33
|
+
if (keyName && SERVER_ONLY_ECO_PAGE_OPTION_KEYS.has(keyName)) {
|
|
34
|
+
removedProperty = true;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
keptProperties.push(source.slice(property.start, property.end));
|
|
39
|
+
}
|
|
40
|
+
if (!removedProperty)
|
|
41
|
+
return;
|
|
42
|
+
const replacement = keptProperties.length > 0 ? `{ ${keptProperties.join(', ')} }` : '{}';
|
|
43
|
+
edits.push({
|
|
44
|
+
start: objectExpression.start,
|
|
45
|
+
end: objectExpression.end,
|
|
46
|
+
replacement,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function getObjectPropertyKeyName(node) {
|
|
50
|
+
if (!node)
|
|
51
|
+
return undefined;
|
|
52
|
+
if (node.type === 'Identifier')
|
|
53
|
+
return node.name;
|
|
54
|
+
if (node.type === 'StringLiteral' || node.type === 'Literal') {
|
|
55
|
+
return typeof node.value === 'string' ? node.value : undefined;
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Removes server-only `eco.page(...)` options from browser-bound modules.
|
|
61
|
+
*/
|
|
62
|
+
export function stripServerOnlyEcoPageOptions(source, program) {
|
|
63
|
+
const edits = [];
|
|
64
|
+
walkAstNodes(program, (node) => {
|
|
65
|
+
collectEcoPageOptionStripEdit(node, source, edits);
|
|
66
|
+
});
|
|
67
|
+
if (edits.length === 0) {
|
|
68
|
+
return { transformed: source, modified: false };
|
|
69
|
+
}
|
|
70
|
+
return { transformed: applySourceEdits(source, edits), modified: true };
|
|
71
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds source edits for import declaration specifier pruning.
|
|
3
|
+
*/
|
|
4
|
+
export type SourceEdit = {
|
|
5
|
+
start: number;
|
|
6
|
+
end: number;
|
|
7
|
+
replacement: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Applies range replacements from last-to-first so earlier offsets stay valid.
|
|
11
|
+
*/
|
|
12
|
+
export declare function applySourceEdits(source: string, edits: SourceEdit[]): string;
|
|
13
|
+
export declare function buildImportDeclarationRewrite(node: any, specifier: string, rules: Set<string>): SourceEdit | undefined;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds source edits for import declaration specifier pruning.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Applies range replacements from last-to-first so earlier offsets stay valid.
|
|
6
|
+
*/
|
|
7
|
+
export function applySourceEdits(source, edits) {
|
|
8
|
+
edits.sort((a, b) => b.start - a.start);
|
|
9
|
+
let transformed = source;
|
|
10
|
+
for (const edit of edits) {
|
|
11
|
+
transformed = transformed.slice(0, edit.start) + edit.replacement + transformed.slice(edit.end);
|
|
12
|
+
}
|
|
13
|
+
return transformed;
|
|
14
|
+
}
|
|
15
|
+
function collectKeptImportSpecifiers(node, rules) {
|
|
16
|
+
const kept = { keptSpecifierCount: 0, namedImportNodes: [] };
|
|
17
|
+
for (const spec of node.specifiers) {
|
|
18
|
+
if (spec.type === 'ImportSpecifier') {
|
|
19
|
+
appendKeptNamedSpecifier(spec, rules, kept);
|
|
20
|
+
}
|
|
21
|
+
else if (spec.type === 'ImportDefaultSpecifier') {
|
|
22
|
+
appendKeptDefaultSpecifier(spec, rules, kept);
|
|
23
|
+
}
|
|
24
|
+
else if (spec.type === 'ImportNamespaceSpecifier') {
|
|
25
|
+
appendKeptNamespaceSpecifier(spec, rules, kept);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return kept;
|
|
29
|
+
}
|
|
30
|
+
function appendKeptNamedSpecifier(spec, rules, kept) {
|
|
31
|
+
const importedName = spec.imported.type === 'Identifier' ? spec.imported.name : spec.imported.value;
|
|
32
|
+
if (!rules.has(importedName))
|
|
33
|
+
return;
|
|
34
|
+
kept.keptSpecifierCount += 1;
|
|
35
|
+
const localName = spec.local?.name;
|
|
36
|
+
kept.namedImportNodes.push(localName && localName !== importedName ? `${importedName} as ${localName}` : importedName);
|
|
37
|
+
}
|
|
38
|
+
function appendKeptDefaultSpecifier(spec, rules, kept) {
|
|
39
|
+
if (!rules.has('default'))
|
|
40
|
+
return;
|
|
41
|
+
kept.keptSpecifierCount += 1;
|
|
42
|
+
kept.defaultImportLocal = spec.local.name;
|
|
43
|
+
}
|
|
44
|
+
function appendKeptNamespaceSpecifier(spec, rules, kept) {
|
|
45
|
+
if (!rules.has('*'))
|
|
46
|
+
return;
|
|
47
|
+
kept.keptSpecifierCount += 1;
|
|
48
|
+
kept.namespaceImportLocal = spec.local.name;
|
|
49
|
+
}
|
|
50
|
+
export function buildImportDeclarationRewrite(node, specifier, rules) {
|
|
51
|
+
const { keptSpecifierCount, defaultImportLocal, namespaceImportLocal, namedImportNodes } = collectKeptImportSpecifiers(node, rules);
|
|
52
|
+
if (keptSpecifierCount === 0) {
|
|
53
|
+
return { start: node.start, end: node.end, replacement: '' };
|
|
54
|
+
}
|
|
55
|
+
if (keptSpecifierCount >= node.specifiers.length) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const newDeclaration = formatPrunedImportDeclaration(specifier, defaultImportLocal, namespaceImportLocal, namedImportNodes);
|
|
59
|
+
return { start: node.start, end: node.end, replacement: newDeclaration };
|
|
60
|
+
}
|
|
61
|
+
function formatPrunedImportDeclaration(specifier, defaultImportLocal, namespaceImportLocal, namedImportNodes) {
|
|
62
|
+
if (defaultImportLocal && namespaceImportLocal) {
|
|
63
|
+
return `import ${defaultImportLocal}, * as ${namespaceImportLocal} from '${specifier}';`;
|
|
64
|
+
}
|
|
65
|
+
if (namespaceImportLocal) {
|
|
66
|
+
return `import * as ${namespaceImportLocal} from '${specifier}';`;
|
|
67
|
+
}
|
|
68
|
+
if (defaultImportLocal && namedImportNodes.length > 0) {
|
|
69
|
+
return `import ${defaultImportLocal}, { ${namedImportNodes.join(', ')} } from '${specifier}';`;
|
|
70
|
+
}
|
|
71
|
+
if (defaultImportLocal) {
|
|
72
|
+
return `import ${defaultImportLocal} from '${specifier}';`;
|
|
73
|
+
}
|
|
74
|
+
return `import { ${namedImportNodes.join(', ')} } from '${specifier}';`;
|
|
75
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AST walk that prunes forbidden imports and rewrites named import surfaces.
|
|
3
|
+
*/
|
|
4
|
+
import type { ReachabilityResult } from './reachability-analyzer.js';
|
|
5
|
+
import { type SourceEdit } from './ast-transform-import-edits.js';
|
|
6
|
+
export type ProcessSpecifierResult = {
|
|
7
|
+
allowed: boolean;
|
|
8
|
+
rules?: Set<string> | '*';
|
|
9
|
+
};
|
|
10
|
+
export type WalkImportsContext = {
|
|
11
|
+
filename: string;
|
|
12
|
+
reachability: ReachabilityResult;
|
|
13
|
+
edits: SourceEdit[];
|
|
14
|
+
allowedMap: Map<string, Set<string> | '*'>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Walks a parsed program and collects import-pruning edits.
|
|
18
|
+
*/
|
|
19
|
+
export declare function collectImportTransformEdits(program: any, ctx: Omit<WalkImportsContext, 'edits'>): SourceEdit[];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AST walk that prunes forbidden imports and rewrites named import surfaces.
|
|
3
|
+
*/
|
|
4
|
+
import { isServerOnlySpecifier, toModuleBaseSpecifier } from './specifier-classification.js';
|
|
5
|
+
import { walkAstNodes } from './ast-walk.js';
|
|
6
|
+
import { buildImportDeclarationRewrite } from './ast-transform-import-edits.js';
|
|
7
|
+
function processSpecifier(specifier, allowedMap) {
|
|
8
|
+
const explicitRules = allowedMap.get(toModuleBaseSpecifier(specifier));
|
|
9
|
+
if (isServerOnlySpecifier(specifier) && !explicitRules) {
|
|
10
|
+
return { allowed: false };
|
|
11
|
+
}
|
|
12
|
+
return { allowed: true, rules: explicitRules ?? '*' };
|
|
13
|
+
}
|
|
14
|
+
function pruneForbiddenSpecifier(node, ctx, specifier, message, replacement) {
|
|
15
|
+
const reachableRules = ctx.reachability.reachableImports.get(specifier);
|
|
16
|
+
if (reachableRules && !ctx.reachability.isFallbackRoots) {
|
|
17
|
+
throw new Error(`[Ecopages Client Reachability] ${message} at ${ctx.filename}:${node.start}. This import is explicitly reachable from the React render function.`);
|
|
18
|
+
}
|
|
19
|
+
ctx.edits.push({ start: node.start, end: node.end, replacement });
|
|
20
|
+
}
|
|
21
|
+
function handleImportDeclaration(node, ctx) {
|
|
22
|
+
const specifier = node.source.value;
|
|
23
|
+
const reachableRules = ctx.reachability.reachableImports.get(specifier);
|
|
24
|
+
const { allowed, rules } = processSpecifier(specifier, ctx.allowedMap);
|
|
25
|
+
if (!allowed) {
|
|
26
|
+
pruneForbiddenSpecifier(node, ctx, specifier, `Forbidden client import '${specifier}'`, '');
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (rules instanceof Set && node.specifiers && node.specifiers.length > 0) {
|
|
30
|
+
const rewrite = buildImportDeclarationRewrite(node, specifier, rules);
|
|
31
|
+
if (rewrite) {
|
|
32
|
+
ctx.edits.push(rewrite);
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
if (!reachableRules && (!node.specifiers || node.specifiers.length === 0)) {
|
|
37
|
+
ctx.edits.push({ start: node.start, end: node.end, replacement: '' });
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function handleExportNamedDeclaration(node, ctx) {
|
|
42
|
+
const specifier = node.source.value;
|
|
43
|
+
const { allowed } = processSpecifier(specifier, ctx.allowedMap);
|
|
44
|
+
if (!allowed) {
|
|
45
|
+
pruneForbiddenSpecifier(node, ctx, specifier, `Forbidden client export from '${specifier}'`, '');
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function handleExportAllDeclaration(node, ctx) {
|
|
50
|
+
const specifier = node.source.value;
|
|
51
|
+
const { allowed } = processSpecifier(specifier, ctx.allowedMap);
|
|
52
|
+
if (!allowed) {
|
|
53
|
+
pruneForbiddenSpecifier(node, ctx, specifier, `Forbidden client export * from '${specifier}'`, '');
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
function handleImportExpression(node, ctx) {
|
|
58
|
+
if (!node.source?.value)
|
|
59
|
+
return false;
|
|
60
|
+
const specifier = node.source.value;
|
|
61
|
+
const { allowed } = processSpecifier(specifier, ctx.allowedMap);
|
|
62
|
+
if (!allowed) {
|
|
63
|
+
pruneForbiddenSpecifier(node, ctx, specifier, `Forbidden dynamic import('${specifier}')`, 'Promise.resolve({})');
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
function handleRequireCall(node, ctx) {
|
|
68
|
+
const arg = node.arguments?.[0];
|
|
69
|
+
if (!arg || (arg.type !== 'StringLiteral' && arg.type !== 'Literal') || typeof arg.value !== 'string') {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const specifier = arg.value;
|
|
73
|
+
const { allowed } = processSpecifier(specifier, ctx.allowedMap);
|
|
74
|
+
if (!allowed) {
|
|
75
|
+
pruneForbiddenSpecifier(node, ctx, specifier, `Forbidden require('${specifier}')`, '({})');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Walks a parsed program and collects import-pruning edits.
|
|
80
|
+
*/
|
|
81
|
+
export function collectImportTransformEdits(program, ctx) {
|
|
82
|
+
const edits = [];
|
|
83
|
+
const fullCtx = { ...ctx, edits };
|
|
84
|
+
walkAstNodes(program, (node) => {
|
|
85
|
+
if (node.type === 'ImportDeclaration') {
|
|
86
|
+
return handleImportDeclaration(node, fullCtx);
|
|
87
|
+
}
|
|
88
|
+
if (node.type === 'ExportNamedDeclaration' && node.source) {
|
|
89
|
+
return handleExportNamedDeclaration(node, fullCtx);
|
|
90
|
+
}
|
|
91
|
+
if (node.type === 'ExportAllDeclaration' && node.source) {
|
|
92
|
+
return handleExportAllDeclaration(node, fullCtx);
|
|
93
|
+
}
|
|
94
|
+
if (node.type === 'ImportExpression') {
|
|
95
|
+
return handleImportExpression(node, fullCtx);
|
|
96
|
+
}
|
|
97
|
+
if (node.type === 'CallExpression' && node.callee?.type === 'Identifier' && node.callee.name === 'require') {
|
|
98
|
+
handleRequireCall(node, fullCtx);
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
});
|
|
102
|
+
return edits;
|
|
103
|
+
}
|
|
@@ -5,14 +5,8 @@ import type { RequestedExportRules } from './boundary-cache.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Parses a module using Oxc AST and surgically removes forbidden imports.
|
|
7
7
|
* Filters down to the exact specifiers requested via `{namedImport}` syntax.
|
|
8
|
-
*
|
|
9
|
-
* @param source - The raw string source content of the module.
|
|
10
|
-
* @param filename - The absolute path of the module.
|
|
11
|
-
* @param globallyAllowed - A map of modules declared globally allowable by the build configuration.
|
|
12
|
-
* @param requestedExports - Local requested-export registry used to propagate named reachability across files.
|
|
13
|
-
* @returns An object containing the transformed string and a boolean indicating if changes occurred.
|
|
14
8
|
*/
|
|
15
|
-
export declare function transformModuleImports(source: string, filename: string, globallyAllowed: Map<string, Set<string> | '*'>, requestedExports: Map<string, RequestedExportRules>,
|
|
9
|
+
export declare function transformModuleImports(source: string, filename: string, globallyAllowed: Map<string, Set<string> | '*'>, requestedExports: Map<string, RequestedExportRules>, stripServerOnlyPageOptions?: boolean): {
|
|
16
10
|
transformed: string;
|
|
17
11
|
modified: boolean;
|
|
18
12
|
};
|