vike 0.4.228-commit-4bed128 → 0.4.228-commit-84954ae
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/cjs/node/plugin/plugins/baseUrls.js +1 -1
- package/dist/cjs/node/plugin/plugins/build/handleAssetsManifest.js +1 -1
- package/dist/cjs/node/plugin/plugins/build/pluginBuildApp.js +1 -1
- package/dist/cjs/node/plugin/plugins/build/pluginBuildConfig.js +3 -10
- package/dist/cjs/node/plugin/plugins/build/pluginBuildEntry.js +1 -4
- package/dist/cjs/node/plugin/plugins/commonConfig/assertResolveAlias.js +1 -1
- package/dist/cjs/node/plugin/plugins/commonConfig.js +11 -3
- package/dist/cjs/node/plugin/plugins/devConfig/determineFsAllowList.js +2 -7
- package/dist/cjs/node/plugin/plugins/devConfig/determineOptimizeDeps.js +1 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loadFileAtConfigTime.js +2 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformPointerImports.js → pointerImports.js} +13 -0
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolvePointerImport.js +20 -19
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +14 -10
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +1 -1
- package/dist/cjs/node/plugin/shared/getFilePath.js +2 -2
- package/dist/cjs/node/plugin/shared/resolveClientEntriesDev.js +7 -19
- package/dist/cjs/node/plugin/utils.js +1 -0
- package/dist/cjs/node/prerender/runPrerender.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +1 -1
- package/dist/cjs/node/runtime/utils.js +1 -1
- package/dist/cjs/shared/getPageFiles/fileTypes.js +1 -1
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +3 -7
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/isImportPath.js +21 -0
- package/dist/cjs/utils/{isNpmPackage.js → parseNpmPackage.js} +23 -23
- package/dist/cjs/utils/path.js +12 -2
- package/dist/cjs/utils/requireResolve.js +98 -39
- package/dist/esm/node/plugin/plugins/baseUrls.js +2 -2
- package/dist/esm/node/plugin/plugins/build/handleAssetsManifest.js +2 -2
- package/dist/esm/node/plugin/plugins/build/pluginBuildApp.js +2 -2
- package/dist/esm/node/plugin/plugins/build/pluginBuildConfig.js +4 -11
- package/dist/esm/node/plugin/plugins/build/pluginBuildEntry.js +2 -5
- package/dist/esm/node/plugin/plugins/commonConfig/assertResolveAlias.js +2 -2
- package/dist/esm/node/plugin/plugins/commonConfig.d.ts +2 -0
- package/dist/esm/node/plugin/plugins/commonConfig.js +12 -4
- package/dist/esm/node/plugin/plugins/devConfig/determineFsAllowList.js +3 -8
- package/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js +2 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loadFileAtConfigTime.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformPointerImports.d.ts → pointerImports.d.ts} +2 -0
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformPointerImports.js → pointerImports.js} +14 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolvePointerImport.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolvePointerImport.js +20 -19
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +14 -10
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +1 -1
- package/dist/esm/node/plugin/shared/getFilePath.js +3 -3
- package/dist/esm/node/plugin/shared/resolveClientEntriesDev.js +8 -20
- package/dist/esm/node/plugin/utils.d.ts +1 -0
- package/dist/esm/node/plugin/utils.js +1 -0
- package/dist/esm/node/prerender/runPrerender.js +2 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.js +2 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +2 -2
- package/dist/esm/node/runtime/utils.d.ts +1 -1
- package/dist/esm/node/runtime/utils.js +1 -1
- package/dist/esm/shared/getPageFiles/fileTypes.js +1 -1
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +3 -7
- package/dist/esm/shared/types.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/isImportPath.d.ts +4 -0
- package/dist/esm/utils/isImportPath.js +19 -0
- package/dist/esm/utils/parseNpmPackage.d.ts +17 -0
- package/dist/esm/utils/{isNpmPackage.js → parseNpmPackage.js} +23 -23
- package/dist/esm/utils/path.d.ts +1 -1
- package/dist/esm/utils/path.js +12 -2
- package/dist/esm/utils/requireResolve.d.ts +20 -7
- package/dist/esm/utils/requireResolve.js +98 -39
- package/package.json +1 -1
- package/dist/esm/utils/isNpmPackage.d.ts +0 -17
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
3
|
+
exports.isImportPathNpmPackage = isImportPathNpmPackage;
|
|
4
|
+
exports.isImportPathNpmPackageOrPathAlias = isImportPathNpmPackageOrPathAlias;
|
|
5
|
+
exports.assertIsImportPathNpmPackage = assertIsImportPathNpmPackage;
|
|
6
|
+
exports.isPathAliasRecommended = isPathAliasRecommended;
|
|
7
|
+
exports.parseNpmPackage = parseNpmPackage;
|
|
8
8
|
exports.isDistinguishable = isDistinguishable;
|
|
9
9
|
const assert_js_1 = require("./assert.js");
|
|
10
10
|
const assertIsNotBrowser_js_1 = require("./assertIsNotBrowser.js");
|
|
11
11
|
(0, assertIsNotBrowser_js_1.assertIsNotBrowser)();
|
|
12
|
-
function
|
|
12
|
+
function isImportPathNpmPackage(str, { cannotBePathAlias }) {
|
|
13
13
|
(0, assert_js_1.assert)(cannotBePathAlias);
|
|
14
|
-
return
|
|
14
|
+
return isImportPathNpmPackageOrPathAlias(str);
|
|
15
15
|
}
|
|
16
16
|
// We cannot distinguish path aliases that look like npm package imports
|
|
17
|
-
function
|
|
18
|
-
const res =
|
|
17
|
+
function isImportPathNpmPackageOrPathAlias(str) {
|
|
18
|
+
const res = parseNpmPackage(str);
|
|
19
19
|
return res !== null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
(0, assert_js_1.assert)(
|
|
23
|
-
// If `str` is a path alias that looks like an npm package =>
|
|
21
|
+
function assertIsImportPathNpmPackage(str) {
|
|
22
|
+
(0, assert_js_1.assert)(isImportPathNpmPackage(str, {
|
|
23
|
+
// If `str` is a path alias that looks like an npm package => assertIsImportPathNpmPackage() is erroneous but that's okay because the assertion will eventually fail for some other user using a disambiguated path alias.
|
|
24
24
|
cannotBePathAlias: true
|
|
25
25
|
}), str);
|
|
26
26
|
}
|
|
27
27
|
function isNpmPackageName(str) {
|
|
28
|
-
const res =
|
|
28
|
+
const res = parseNpmPackage(str);
|
|
29
29
|
return res !== null && res.importPath === null;
|
|
30
30
|
}
|
|
31
31
|
function getNpmPackageName(str) {
|
|
32
|
-
const res =
|
|
32
|
+
const res = parseNpmPackage(str);
|
|
33
33
|
if (!res)
|
|
34
34
|
return null;
|
|
35
35
|
return res.pkgName;
|
|
36
36
|
}
|
|
37
37
|
function getNpmPackageImportPath(str) {
|
|
38
|
-
const res =
|
|
38
|
+
const res = parseNpmPackage(str);
|
|
39
39
|
if (!res)
|
|
40
40
|
return null;
|
|
41
41
|
return res.importPath;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function isPathAliasRecommended(alias) {
|
|
44
44
|
// Cannot be distinguished from npm package names
|
|
45
45
|
if (!isDistinguishable(alias))
|
|
46
46
|
return false;
|
|
@@ -56,14 +56,14 @@ function isValidPathAlias(alias) {
|
|
|
56
56
|
return true;
|
|
57
57
|
}
|
|
58
58
|
function isDistinguishable(alias) {
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
return (parseNpmPackage(alias) === null &&
|
|
60
|
+
parseNpmPackage(`${alias}fake-path`) === null &&
|
|
61
|
+
parseNpmPackage(`${alias}/fake-path`) === null &&
|
|
62
|
+
parseNpmPackage(`${alias}fake/deep/path`) === null &&
|
|
63
|
+
parseNpmPackage(`${alias}/fake/deep/path`) === null &&
|
|
64
64
|
// See note about '-' in ./isNpmPackageName.spec.ts
|
|
65
65
|
// ```ts
|
|
66
|
-
// expect(
|
|
66
|
+
// expect(parseNpmPackage('-')).toBe(null) // actually wrong: https://www.npmjs.com/package/-
|
|
67
67
|
// ```
|
|
68
68
|
!alias.startsWith('-'));
|
|
69
69
|
}
|
|
@@ -71,7 +71,7 @@ function isDistinguishable(alias) {
|
|
|
71
71
|
// - https://www.npmjs.com/package/-
|
|
72
72
|
// The correct logic is complex, see https://github.com/npm/validate-npm-package-name
|
|
73
73
|
// We don't need to be accurate: are there npm packages with weird names that are actually being used?
|
|
74
|
-
function
|
|
74
|
+
function parseNpmPackage(str) {
|
|
75
75
|
if (!str)
|
|
76
76
|
return null;
|
|
77
77
|
let scope = null;
|
package/dist/cjs/utils/path.js
CHANGED
|
@@ -44,6 +44,16 @@ function assertPosixPath(path) {
|
|
|
44
44
|
(0, assert_js_1.assert)(path);
|
|
45
45
|
(0, assert_js_1.assert)(!path.includes('\\'), errMsg(path));
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
// See also `import { isImportPathRelative } from './isImportPath.js'`
|
|
48
|
+
function pathIsRelative(path) {
|
|
49
|
+
assertPosixPath(path);
|
|
50
|
+
if (path.startsWith('./') || path.startsWith('../')) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
/* Not true if `path` starts with a hidden directory (i.e. a directory with a name that starts with `.`)
|
|
55
|
+
assert(!path.startsWith('.'))
|
|
56
|
+
*/
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
49
59
|
}
|
|
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.requireResolve = requireResolve;
|
|
7
6
|
exports.requireResolveOptional = requireResolveOptional;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
7
|
+
exports.requireResolveOptionalDir = requireResolveOptionalDir;
|
|
8
|
+
exports.requireResolveNpmPackage = requireResolveNpmPackage;
|
|
9
|
+
exports.requireResolveVikeDistFile = requireResolveVikeDistFile;
|
|
10
|
+
exports.getVikeNodeModulesRoot = getVikeNodeModulesRoot;
|
|
10
11
|
const assert_js_1 = require("./assert.js");
|
|
11
12
|
const assertIsNotBrowser_js_1 = require("./assertIsNotBrowser.js");
|
|
12
13
|
const assertSetup_js_1 = require("./assertSetup.js");
|
|
@@ -14,68 +15,94 @@ const path_js_1 = require("./path.js");
|
|
|
14
15
|
const isScriptFile_js_1 = require("./isScriptFile.js");
|
|
15
16
|
const node_module_1 = require("node:module");
|
|
16
17
|
const node_path_1 = __importDefault(require("node:path"));
|
|
18
|
+
const parseNpmPackage_js_1 = require("./parseNpmPackage.js");
|
|
17
19
|
// @ts-ignore `file:///${__filename.split('\\').join('/')}` is shimmed at dist/cjs by dist-cjs-fixup.js.
|
|
18
20
|
const importMetaUrl = `file:///${__filename.split('\\').join('/')}`;
|
|
19
|
-
const require_ = (0, node_module_1.createRequire)(importMetaUrl);
|
|
20
21
|
(0, assertIsNotBrowser_js_1.assertIsNotBrowser)();
|
|
21
22
|
(0, assertSetup_js_1.assertIsNotProductionRuntime)();
|
|
22
|
-
function requireResolve_(importPath,
|
|
23
|
-
(0, path_js_1.assertPosixPath)(
|
|
23
|
+
function requireResolve_(importPath, importerFile, options) {
|
|
24
|
+
(0, path_js_1.assertPosixPath)(importerFile);
|
|
24
25
|
(0, path_js_1.assertPosixPath)(importPath);
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
(0, path_js_1.assertPosixPath)(importMetaUrl);
|
|
27
|
+
(0, assert_js_1.assert)(node_path_1.default.posix.basename(importerFile).includes('.'), { cwd: importerFile });
|
|
28
|
+
const importerPath = addFilePrefix(importerFile);
|
|
29
|
+
const require_ = (0, node_module_1.createRequire)(importerPath);
|
|
27
30
|
if (!options?.doNotHandleFileExtension) {
|
|
28
|
-
|
|
31
|
+
addFileExtensionsToRequireResolve(require_);
|
|
29
32
|
importPath = removeFileExtention(importPath);
|
|
30
33
|
}
|
|
34
|
+
const paths = !options?.paths
|
|
35
|
+
? undefined
|
|
36
|
+
: [
|
|
37
|
+
// Seems like `importerPath` gets overriden by the `paths` argument, so we add it to `paths`. (For example, passing an empty array to `paths` kills the argument passed to `createRequire()`.)
|
|
38
|
+
toDirPath(importerFile),
|
|
39
|
+
...(options?.paths || [])
|
|
40
|
+
];
|
|
31
41
|
let importedFile;
|
|
32
42
|
try {
|
|
33
43
|
// We still can't use import.meta.resolve() as of 23.1.0 (November 2024) because `parent` argument requires an experimental flag.
|
|
34
44
|
// - https://stackoverflow.com/questions/54977743/do-require-resolve-for-es-modules#comment139581675_62272600
|
|
35
|
-
importedFile = require_.resolve(importPath, { paths
|
|
45
|
+
importedFile = require_.resolve(importPath, { paths });
|
|
36
46
|
}
|
|
37
47
|
catch (err) {
|
|
38
|
-
clean();
|
|
39
48
|
return { importedFile: undefined, err, hasFailed: true };
|
|
40
49
|
}
|
|
41
|
-
clean();
|
|
42
50
|
importedFile = (0, path_js_1.toPosixPath)(importedFile);
|
|
43
51
|
return { importedFile, err: undefined, hasFailed: false };
|
|
44
52
|
}
|
|
45
|
-
function requireResolveOptional(importPath,
|
|
46
|
-
const
|
|
53
|
+
function requireResolveOptional({ importPath, importerFile, userRootDir }) {
|
|
54
|
+
const paths = getExtraPathsForNpmPackageImport({ importPath, userRootDir });
|
|
55
|
+
const res = requireResolve_(importPath, importerFile, { paths });
|
|
47
56
|
if (res.hasFailed)
|
|
48
57
|
return null;
|
|
49
58
|
return res.importedFile;
|
|
50
59
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
60
|
+
function requireResolveOptionalDir({ importPath, importerDir, userRootDir }) {
|
|
61
|
+
const importerFile = getFakeFilePath(importerDir);
|
|
62
|
+
const paths = getExtraPathsForNpmPackageImport({ importPath, userRootDir });
|
|
63
|
+
const res = requireResolve_(importPath, importerFile, { paths });
|
|
53
64
|
if (res.hasFailed)
|
|
54
65
|
return null;
|
|
55
66
|
return res.importedFile;
|
|
56
67
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
68
|
+
function requireResolveNpmPackage({ importPathNpmPackage, userRootDir }) {
|
|
69
|
+
(0, parseNpmPackage_js_1.assertIsImportPathNpmPackage)(importPathNpmPackage);
|
|
70
|
+
const importerFile = getFakeFilePath(userRootDir);
|
|
71
|
+
const paths = getExtraPathsForNpmPackageImport({ importPath: importPathNpmPackage, userRootDir });
|
|
72
|
+
const res = requireResolve_(importPathNpmPackage, importerFile, { paths });
|
|
59
73
|
if (res.hasFailed)
|
|
60
74
|
throw res.err;
|
|
61
75
|
return res.importedFile;
|
|
62
76
|
}
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
function requireResolveVikeDistFile(vikeDistFile) {
|
|
78
|
+
const vikeNodeModulesRoot = getVikeNodeModulesRoot();
|
|
79
|
+
(0, path_js_1.assertPosixPath)(vikeNodeModulesRoot);
|
|
80
|
+
(0, path_js_1.assertPosixPath)(vikeDistFile);
|
|
81
|
+
const importedFile = node_path_1.default.posix.join(vikeNodeModulesRoot, vikeDistFile);
|
|
82
|
+
// Double check
|
|
83
|
+
{
|
|
84
|
+
const res = requireResolve_(importedFile,
|
|
85
|
+
// Passing some dummy context as the context isn't needed since importerFile is already resolved and absolute
|
|
86
|
+
importMetaUrl, { doNotHandleFileExtension: true });
|
|
87
|
+
if (res.hasFailed)
|
|
88
|
+
throw res.err;
|
|
89
|
+
(0, assert_js_1.assert)(res.importedFile === importedFile);
|
|
90
|
+
}
|
|
91
|
+
return importedFile;
|
|
68
92
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
cwd = cwd.slice(prefix.length);
|
|
75
|
-
cwd = node_path_1.default.posix.dirname(cwd);
|
|
93
|
+
function getExtraPathsForNpmPackageImport({ importPath, userRootDir }) {
|
|
94
|
+
if (
|
|
95
|
+
// Ideally we'd set `paths` only for npm packages, but unfortunately we cannot always disambiguate between npm package imports and path aliases.
|
|
96
|
+
!(0, parseNpmPackage_js_1.isImportPathNpmPackageOrPathAlias)(importPath)) {
|
|
97
|
+
return undefined;
|
|
76
98
|
}
|
|
77
|
-
|
|
78
|
-
|
|
99
|
+
const paths = [
|
|
100
|
+
// Workaround for monorepo resolve issue: https://github.com/vikejs/vike-react/pull/161/commits/dbaa6643e78015ac2797c237552800fef29b72a7
|
|
101
|
+
userRootDir,
|
|
102
|
+
// I can't think of a use case where this would be needed, but let's add it to be extra safe
|
|
103
|
+
toDirPath(importMetaUrl)
|
|
104
|
+
];
|
|
105
|
+
return paths;
|
|
79
106
|
}
|
|
80
107
|
function removeFileExtention(importPath) {
|
|
81
108
|
// Skip for Bun: https://github.com/vikejs/vike/issues/2204
|
|
@@ -93,7 +120,7 @@ function removeFileExtention(importPath) {
|
|
|
93
120
|
}
|
|
94
121
|
return importPath;
|
|
95
122
|
}
|
|
96
|
-
function addFileExtensionsToRequireResolve() {
|
|
123
|
+
function addFileExtensionsToRequireResolve(require_) {
|
|
97
124
|
const added = [];
|
|
98
125
|
isScriptFile_js_1.scriptFileExtensionList.forEach((ext) => {
|
|
99
126
|
(0, assert_js_1.assert)(!ext.includes('.'));
|
|
@@ -103,10 +130,42 @@ function addFileExtensionsToRequireResolve() {
|
|
|
103
130
|
added.push(ext);
|
|
104
131
|
}
|
|
105
132
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return
|
|
133
|
+
}
|
|
134
|
+
function getVikeNodeModulesRoot() {
|
|
135
|
+
// [RELATIVE_PATH_FROM_DIST] Current file: vike/dist/esm/utils/requireResolve.js
|
|
136
|
+
(0, assert_js_1.assert)(importMetaUrl.includes('/dist/esm/') || importMetaUrl.includes('/dist/cjs/'));
|
|
137
|
+
const vikeNodeModulesRoot = node_path_1.default.posix.join(removeFilePrefix(importMetaUrl), '../../../../');
|
|
138
|
+
return vikeNodeModulesRoot;
|
|
139
|
+
}
|
|
140
|
+
function toDirPath(filePath) {
|
|
141
|
+
return node_path_1.default.posix.dirname(removeFilePrefix(filePath));
|
|
142
|
+
}
|
|
143
|
+
function getFakeFilePath(dirPath) {
|
|
144
|
+
(0, path_js_1.assertPosixPath)(dirPath);
|
|
145
|
+
(0, assert_js_1.assert)(!dirPath.startsWith('file')); // The file:// prefix is bogus with path.join
|
|
146
|
+
const filePath = node_path_1.default.posix.join(dirPath, 'fakeFileForNodeResolve.js');
|
|
147
|
+
return filePath;
|
|
148
|
+
}
|
|
149
|
+
function addFilePrefix(filePath) {
|
|
150
|
+
const filePrefix = getFilePrefix();
|
|
151
|
+
if (!filePath.startsWith(filePrefix)) {
|
|
152
|
+
(0, assert_js_1.assert)(!filePath.startsWith('file'));
|
|
153
|
+
filePath = filePrefix + filePath;
|
|
154
|
+
}
|
|
155
|
+
(0, assert_js_1.assert)(filePath.startsWith(filePrefix));
|
|
156
|
+
return filePath;
|
|
157
|
+
}
|
|
158
|
+
function removeFilePrefix(filePath) {
|
|
159
|
+
const filePrefix = getFilePrefix();
|
|
160
|
+
if (filePath.startsWith(filePrefix)) {
|
|
161
|
+
filePath = filePath.slice(filePrefix.length);
|
|
162
|
+
}
|
|
163
|
+
(0, assert_js_1.assert)(!filePath.startsWith('file'));
|
|
164
|
+
return filePath;
|
|
165
|
+
}
|
|
166
|
+
function getFilePrefix() {
|
|
167
|
+
let prefix = 'file://';
|
|
168
|
+
if (process.platform === 'win32')
|
|
169
|
+
prefix += '/';
|
|
170
|
+
return prefix;
|
|
112
171
|
}
|
|
@@ -2,7 +2,7 @@ export { baseUrls };
|
|
|
2
2
|
import { resolveBase } from '../../shared/resolveBase.js';
|
|
3
3
|
import { assert } from '../utils.js';
|
|
4
4
|
import { getVikeConfig } from './importUserCode/v1-design/getVikeConfig.js';
|
|
5
|
-
import {
|
|
5
|
+
import { getVikeConfigInternal } from './commonConfig.js';
|
|
6
6
|
function baseUrls() {
|
|
7
7
|
let basesResolved;
|
|
8
8
|
return {
|
|
@@ -12,7 +12,7 @@ function baseUrls() {
|
|
|
12
12
|
const isDev = config._isDev;
|
|
13
13
|
assert(typeof isDev === 'boolean');
|
|
14
14
|
const baseViteOriginal = config.base ?? '/__UNSET__'; // '/__UNSET__' because Vite resolves `_baseViteOriginal: null` to `undefined`
|
|
15
|
-
const vike =
|
|
15
|
+
const vike = getVikeConfigInternal(config);
|
|
16
16
|
basesResolved = resolveBase(baseViteOriginal, vike.config.baseServer ?? null, vike.config.baseAssets ?? null);
|
|
17
17
|
// We cannot define these in configResolved() because Vite picks up the env variables before any configResolved() hook is called
|
|
18
18
|
process.env.BASE_SERVER = basesResolved.baseServer;
|
|
@@ -15,7 +15,7 @@ import pc from '@brillout/picocolors';
|
|
|
15
15
|
import { isV1Design } from '../importUserCode/v1-design/getVikeConfig.js';
|
|
16
16
|
import { getOutDirs } from '../../shared/getOutDirs.js';
|
|
17
17
|
import { isViteServerBuild_onlySsrEnv, isViteServerBuild } from '../../shared/isViteServerBuild.js';
|
|
18
|
-
import {
|
|
18
|
+
import { getVikeConfigInternal } from '../commonConfig.js';
|
|
19
19
|
import { set_macro_ASSETS_MANIFEST } from './pluginBuildEntry.js';
|
|
20
20
|
assertIsSingleModuleInstance('build/handleAssetsManifest.ts');
|
|
21
21
|
let assetsJsonFilePath;
|
|
@@ -281,7 +281,7 @@ async function writeManifestFile(manifest, manifestFilePath) {
|
|
|
281
281
|
await fs.writeFile(manifestFilePath, manifestFileContent, 'utf-8');
|
|
282
282
|
}
|
|
283
283
|
function handleAssetsManifest_getBuildConfig(config) {
|
|
284
|
-
const vike =
|
|
284
|
+
const vike = getVikeConfigInternal(config);
|
|
285
285
|
const isFixEnabled = handleAssetsManifest_isFixEnabled(config);
|
|
286
286
|
return {
|
|
287
287
|
// https://github.com/vikejs/vike/issues/1339
|
|
@@ -2,7 +2,7 @@ export { pluginBuildApp };
|
|
|
2
2
|
import { runPrerender_forceExit } from '../../../prerender/runPrerender.js';
|
|
3
3
|
import { resolveOutDir } from '../../shared/getOutDirs.js';
|
|
4
4
|
import { assert } from '../../utils.js';
|
|
5
|
-
import {
|
|
5
|
+
import { getVikeConfigInternal } from '../commonConfig.js';
|
|
6
6
|
import { isPrerenderForceExit } from './pluginAutoFullBuild.js';
|
|
7
7
|
function pluginBuildApp() {
|
|
8
8
|
return [
|
|
@@ -10,7 +10,7 @@ function pluginBuildApp() {
|
|
|
10
10
|
name: 'vike:build:pluginBuildApp',
|
|
11
11
|
apply: 'build',
|
|
12
12
|
config(config) {
|
|
13
|
-
const vike =
|
|
13
|
+
const vike = getVikeConfigInternal(config);
|
|
14
14
|
if (!vike.config.vite6BuilderApp)
|
|
15
15
|
return;
|
|
16
16
|
return {
|
|
@@ -2,7 +2,7 @@ export { pluginBuildConfig };
|
|
|
2
2
|
export { assertRollupInput };
|
|
3
3
|
export { analyzeClientEntries };
|
|
4
4
|
export { manifestTempFile };
|
|
5
|
-
import { assert, addOnBeforeLogHook, removeFileExtention, unique, assertUsage, injectRollupInputs, normalizeRollupInput, onSetupBuild,
|
|
5
|
+
import { assert, addOnBeforeLogHook, removeFileExtention, unique, assertUsage, injectRollupInputs, normalizeRollupInput, onSetupBuild, assertIsImportPathNpmPackage, requireResolveVikeDistFile } from '../../utils.js';
|
|
6
6
|
import { getVikeConfig } from '../importUserCode/v1-design/getVikeConfig.js';
|
|
7
7
|
import { findPageFiles } from '../../shared/findPageFiles.js';
|
|
8
8
|
import { getVirtualFileIdPageConfigValuesAll } from '../../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
@@ -13,8 +13,6 @@ import { getConfigValueBuildTime } from '../../../../shared/page-configs/getConf
|
|
|
13
13
|
import { isViteServerBuild } from '../../shared/isViteServerBuild.js';
|
|
14
14
|
import { resolveOutDir } from '../../shared/getOutDirs.js';
|
|
15
15
|
import { handleAssetsManifest_assertUsageCssCodeSplit, handleAssetsManifest_getBuildConfig } from './handleAssetsManifest.js';
|
|
16
|
-
// @ts-ignore import.meta.url is shimmed at dist/cjs by dist-cjs-fixup.js.
|
|
17
|
-
const importMetaUrl = import.meta.url;
|
|
18
16
|
const manifestTempFile = '_temp_manifest.json';
|
|
19
17
|
function pluginBuildConfig() {
|
|
20
18
|
let config;
|
|
@@ -81,8 +79,8 @@ async function getEntries(config) {
|
|
|
81
79
|
...clientEntries,
|
|
82
80
|
...pageFileEntries
|
|
83
81
|
};
|
|
84
|
-
const clientRoutingEntry =
|
|
85
|
-
const serverRoutingEntry =
|
|
82
|
+
const clientRoutingEntry = requireResolveVikeDistFile('dist/esm/client/client-routing-runtime/entry.js');
|
|
83
|
+
const serverRoutingEntry = requireResolveVikeDistFile('dist/esm/client/server-routing-runtime/entry.js');
|
|
86
84
|
if (hasClientRouting) {
|
|
87
85
|
entries['entries/entry-client-routing'] = clientRoutingEntry;
|
|
88
86
|
}
|
|
@@ -156,7 +154,7 @@ async function getPageFileEntries(config, includeAssetsImportedByServer) {
|
|
|
156
154
|
}
|
|
157
155
|
function getEntryFromClientEntry(clientEntry, config, addExtractAssetsQuery) {
|
|
158
156
|
if (!clientEntry.startsWith('/')) {
|
|
159
|
-
|
|
157
|
+
assertIsImportPathNpmPackage(clientEntry);
|
|
160
158
|
const entryTarget = clientEntry;
|
|
161
159
|
const entryName = prependEntriesDir(clientEntry);
|
|
162
160
|
return { entryName, entryTarget };
|
|
@@ -192,11 +190,6 @@ function getEntryFromPageConfig(pageConfig, isForClientSide) {
|
|
|
192
190
|
assert(!entryName.endsWith('/'));
|
|
193
191
|
return { entryName, entryTarget };
|
|
194
192
|
}
|
|
195
|
-
function resolve(filePath) {
|
|
196
|
-
assert(filePath.startsWith('dist/'));
|
|
197
|
-
// [RELATIVE_PATH_FROM_DIST] Current directory: node_modules/vike/dist/esm/node/plugin/plugins/build/
|
|
198
|
-
return requireResolveNonUserFile(`../../../../../../${filePath}`, importMetaUrl);
|
|
199
|
-
}
|
|
200
193
|
function addLogHook() {
|
|
201
194
|
const tty = process.stdout.isTTY && !process.env.CI; // Equals https://github.com/vitejs/vite/blob/193d55c7b9cbfec5b79ebfca276d4a721e7de14d/packages/vite/src/node/plugins/reporter.ts#L27
|
|
202
195
|
if (!tty)
|
|
@@ -2,11 +2,9 @@ export { pluginBuildEntry };
|
|
|
2
2
|
export { set_macro_ASSETS_MANIFEST };
|
|
3
3
|
import { serverProductionEntryPlugin } from '@brillout/vite-plugin-server-entry/plugin';
|
|
4
4
|
import { virtualFileIdImportUserCodeServer } from '../../../shared/virtual-files/virtualFileImportUserCode.js';
|
|
5
|
-
import { assert, PROJECT_VERSION,
|
|
5
|
+
import { assert, PROJECT_VERSION, requireResolveVikeDistFile } from '../../utils.js';
|
|
6
6
|
import fs from 'fs/promises';
|
|
7
7
|
import path from 'path';
|
|
8
|
-
// @ts-ignore import.meta.url is shimmed at dist/cjs by dist-cjs-fixup.js.
|
|
9
|
-
const importMetaUrl = import.meta.url;
|
|
10
8
|
import { isUsingClientRouter } from '../extractExportNamesPlugin.js';
|
|
11
9
|
import { assertBuildInfo } from '../../../runtime/globalContext.js';
|
|
12
10
|
import { getOutDirs } from '../../shared/getOutDirs.js';
|
|
@@ -93,8 +91,7 @@ function find_ASSETS_MANIFEST(bundle) {
|
|
|
93
91
|
}
|
|
94
92
|
function getImportPath(config) {
|
|
95
93
|
// We resolve filePathAbsolute even if we don't use it: we use require.resolve() as an assertion that the relative path is correct
|
|
96
|
-
|
|
97
|
-
const filePathAbsolute = requireResolveNonUserFile(`../../../../../../dist/esm/__internal/index.js`, importMetaUrl);
|
|
94
|
+
const filePathAbsolute = requireResolveVikeDistFile('dist/esm/__internal/index.js');
|
|
98
95
|
if (
|
|
99
96
|
// Let's implement a new config if a user needs the import to be a relative path instead of 'vike/__internal' (AFAIK a relative path is needed only if a framework has npm package 'vike' as direct dependency instead of a peer dependency and if the user of that framework uses pnpm)
|
|
100
97
|
true) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { assertResolveAlias };
|
|
2
|
-
import { assert, assertUsage, assertWarning, isArray,
|
|
2
|
+
import { assert, assertUsage, assertWarning, isArray, isPathAliasRecommended } from '../../utils.js';
|
|
3
3
|
import pc from '@brillout/picocolors';
|
|
4
4
|
// Recommend users to avoid un-distinguishable path aliases.
|
|
5
5
|
// There are a lot of libraries that don't or cannot follow that recommendation, for example:
|
|
@@ -59,7 +59,7 @@ function assertResolveAlias(config) {
|
|
|
59
59
|
// - determineOptimizeDeps()
|
|
60
60
|
// - extractAssets
|
|
61
61
|
// - in general: using un-distinguishable path aliases is asking for trouble
|
|
62
|
-
if (!
|
|
62
|
+
if (!isPathAliasRecommended(find)) {
|
|
63
63
|
if (find.startsWith('@')) {
|
|
64
64
|
const msg = `${errPrefix} defines an invalid resolve.alias ${deprecation}: a path alias cannot start with ${pc.cyan('@')}, ${errSuffix1}`;
|
|
65
65
|
assertWarning(false, msg, { onlyOnce: true });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { commonConfig };
|
|
2
2
|
export { getVikeConfigPublic };
|
|
3
|
+
export { getVikeConfigInternal };
|
|
3
4
|
export type { VikeConfigPublic };
|
|
4
5
|
import { type InlineConfig, type Plugin, type ResolvedConfig, type UserConfig } from 'vite';
|
|
5
6
|
import { type VikeConfigObject } from './importUserCode/v1-design/getVikeConfig.js';
|
|
@@ -34,4 +35,5 @@ declare function commonConfig(vikeVitePluginOptions: unknown): Plugin[];
|
|
|
34
35
|
*
|
|
35
36
|
* https://vike.dev/getVikeConfig
|
|
36
37
|
*/
|
|
38
|
+
declare function getVikeConfigInternal(config: ResolvedConfig | UserConfig): VikeConfigPublic;
|
|
37
39
|
declare function getVikeConfigPublic(config: ResolvedConfig | UserConfig): VikeConfigPublic;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { commonConfig };
|
|
2
2
|
export { getVikeConfigPublic };
|
|
3
|
-
|
|
3
|
+
export { getVikeConfigInternal };
|
|
4
|
+
import { assert, assertUsage, assertWarning, findPackageJson, hasProp, isDevCheck, isDocker, isObject, isVitest } from '../utils.js';
|
|
4
5
|
import { assertRollupInput } from './build/pluginBuildConfig.js';
|
|
5
6
|
import { installRequireShim_setUserRootDir } from '@brillout/require-shim';
|
|
6
7
|
import pc from '@brillout/picocolors';
|
|
@@ -85,7 +86,7 @@ function commonConfig(vikeVitePluginOptions) {
|
|
|
85
86
|
order: 'post',
|
|
86
87
|
handler(configFromUser) {
|
|
87
88
|
let configFromVike = { server: {}, preview: {} };
|
|
88
|
-
const vike =
|
|
89
|
+
const vike = getVikeConfigInternal(configFromUser);
|
|
89
90
|
if (vike.config.port !== undefined) {
|
|
90
91
|
// https://vike.dev/port
|
|
91
92
|
setDefault('port', vike.config.port, configFromUser, configFromVike);
|
|
@@ -152,6 +153,8 @@ function assertSingleInstance(config) {
|
|
|
152
153
|
function assertVikeCliOrApi(config) {
|
|
153
154
|
if (isVikeCliOrApi())
|
|
154
155
|
return;
|
|
156
|
+
if (isVitest())
|
|
157
|
+
return;
|
|
155
158
|
if (isViteCliCall()) {
|
|
156
159
|
assertWarning(false, `Vite's CLI is deprecated ${pc.underline('https://vike.dev/migration/cli')}`, {
|
|
157
160
|
onlyOnce: true
|
|
@@ -191,7 +194,7 @@ function temp_supportOldInterface(config) {
|
|
|
191
194
|
}
|
|
192
195
|
// TODO/soon rename:
|
|
193
196
|
// - `getVikeConfig()` => `resolveVikeConfig()` ?
|
|
194
|
-
// - `
|
|
197
|
+
// - `getVikeConfigInternal()` => `getVikeConfig()`
|
|
195
198
|
// - `VikeConfigPublic` => `VikeConfig` ?
|
|
196
199
|
// - `VikeConfigObject` => `VikeConfigInternal` ?
|
|
197
200
|
/**
|
|
@@ -199,11 +202,16 @@ function temp_supportOldInterface(config) {
|
|
|
199
202
|
*
|
|
200
203
|
* https://vike.dev/getVikeConfig
|
|
201
204
|
*/
|
|
202
|
-
function
|
|
205
|
+
function getVikeConfigInternal(config) {
|
|
203
206
|
const vikeConfig = config._vike;
|
|
204
207
|
assert(vikeConfig);
|
|
205
208
|
return vikeConfig;
|
|
206
209
|
}
|
|
210
|
+
function getVikeConfigPublic(config) {
|
|
211
|
+
const vikeConfig = config._vike;
|
|
212
|
+
assertUsage(vikeConfig, "getVikeConfig() can only be used when Vite is running with Vike's Vite plugin");
|
|
213
|
+
return vikeConfig;
|
|
214
|
+
}
|
|
207
215
|
// Only emit dist/server/entry.mjs if necessary
|
|
208
216
|
function emitServerEntryOnlyIfNeeded(config) {
|
|
209
217
|
if (config.vitePluginServerEntry?.inject &&
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { determineFsAllowList };
|
|
2
2
|
import { searchForWorkspaceRoot } from 'vite';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { assert, assertPosixPath,
|
|
4
|
+
import { assert, assertPosixPath, getVikeNodeModulesRoot } from '../../utils.js';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
// @ts-ignore import.meta.url is shimmed at dist/cjs by dist-cjs-fixup.js.
|
|
7
7
|
const importMetaUrl = import.meta.url;
|
|
@@ -18,11 +18,6 @@ async function determineFsAllowList(config) {
|
|
|
18
18
|
// We add it again just to be sure.
|
|
19
19
|
fsAllow.push(searchForWorkspaceRoot(process.cwd()));
|
|
20
20
|
// Add node_modules/vike/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const vikeRoot = path.posix.join(__dirname_, '../../../../../../');
|
|
24
|
-
// Assert that `vikeRoot` is indeed pointing to `node_modules/vike/`
|
|
25
|
-
requireResolveNonUserFile(`${vikeRoot}/dist/esm/node/plugin/plugins/devConfig/index.js`, importMetaUrl);
|
|
26
|
-
fsAllow.push(vikeRoot);
|
|
27
|
-
}
|
|
21
|
+
const vikeNodeModulesRoot = getVikeNodeModulesRoot();
|
|
22
|
+
fsAllow.push(vikeNodeModulesRoot);
|
|
28
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { determineOptimizeDeps };
|
|
2
2
|
import { findPageFiles } from '../../shared/findPageFiles.js';
|
|
3
|
-
import { assert,
|
|
3
|
+
import { assert, assertIsImportPathNpmPackage, createDebugger, isArray, unique } from '../../utils.js';
|
|
4
4
|
import { getVikeConfig, isOverriden } from '../importUserCode/v1-design/getVikeConfig.js';
|
|
5
5
|
import { analyzeClientEntries } from '../build/pluginBuildConfig.js';
|
|
6
6
|
import { virtualFileIdImportUserCodeClientCR, virtualFileIdImportUserCodeClientSR } from '../../../shared/virtual-files/virtualFileImportUserCode.js';
|
|
@@ -38,7 +38,7 @@ async function getPageDeps(config, pageConfigs) {
|
|
|
38
38
|
const addInclude = (e) => {
|
|
39
39
|
assert(e);
|
|
40
40
|
// Shouldn't be a path alias, as path aliases would need to be added to config.optimizeDeps.entries instead of config.optimizeDeps.include
|
|
41
|
-
|
|
41
|
+
assertIsImportPathNpmPackage(e);
|
|
42
42
|
include.push(e);
|
|
43
43
|
};
|
|
44
44
|
// V1 design
|
package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/loadFileAtConfigTime.js
CHANGED
|
@@ -7,7 +7,7 @@ import { transpileAndExecuteFile } from './transpileAndExecuteFile.js';
|
|
|
7
7
|
import { getConfigDefinitionOptional } from '../getVikeConfig.js';
|
|
8
8
|
import { assertPlusFileExport } from '../../../../../../shared/page-configs/assertPlusFileExport.js';
|
|
9
9
|
import pc from '@brillout/picocolors';
|
|
10
|
-
import { parsePointerImportData } from './
|
|
10
|
+
import { parsePointerImportData } from './pointerImports.js';
|
|
11
11
|
import { getConfigFileExport } from './getConfigFileExport.js';
|
|
12
12
|
import { resolvePointerImportData } from './resolvePointerImport.js';
|
|
13
13
|
import { getConfigDefinedAt } from '../../../../../../shared/page-configs/getConfigDefinedAt.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { transformPointerImports };
|
|
2
2
|
export { parsePointerImportData };
|
|
3
3
|
export { isPointerImportData };
|
|
4
|
+
export { assertPointerImportPath };
|
|
4
5
|
export type { PointerImportData };
|
|
5
6
|
declare function transformPointerImports(code: string, filePathToShowToUser2: string, pointerImports: Record<string, boolean> | 'all', skipWarnings?: true): string | null;
|
|
6
7
|
/**
|
|
@@ -23,6 +24,7 @@ type PointerImportData = {
|
|
|
23
24
|
};
|
|
24
25
|
declare function isPointerImportData(str: string): boolean;
|
|
25
26
|
declare function parsePointerImportData(importString: string): null | PointerImportData;
|
|
27
|
+
declare function assertPointerImportPath(importPath: string): boolean;
|
|
26
28
|
declare module 'estree' {
|
|
27
29
|
interface BaseNodeWithoutComments {
|
|
28
30
|
start: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { transformPointerImports };
|
|
2
2
|
export { parsePointerImportData };
|
|
3
3
|
export { isPointerImportData };
|
|
4
|
+
export { assertPointerImportPath };
|
|
4
5
|
// Playground: https://github.com/brillout/acorn-playground
|
|
5
6
|
// Notes about `with { type: 'pointer' }`
|
|
6
7
|
// - It works well with TypeScript: it doesn't complain upon `with { type: 'unknown-to-typescript' }` and go-to-definition & types are preserved: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes
|
|
@@ -17,7 +18,7 @@ export { isPointerImportData };
|
|
|
17
18
|
// - Esbuild removes comments: https://github.com/evanw/esbuild/issues/1439#issuecomment-877656182
|
|
18
19
|
// - Using source maps to track these magic comments is brittle (source maps can easily break)
|
|
19
20
|
import { parse } from 'acorn';
|
|
20
|
-
import { assert, assertUsage, assertWarning, styleFileRE } from '../../../../utils.js';
|
|
21
|
+
import { assert, assertUsage, assertWarning, isFilePathAbsolute, isImportPath, styleFileRE } from '../../../../utils.js';
|
|
21
22
|
import pc from '@brillout/picocolors';
|
|
22
23
|
function transformPointerImports(code, filePathToShowToUser2, pointerImports,
|
|
23
24
|
// For ./transformPointerImports.spec.ts
|
|
@@ -144,8 +145,20 @@ function parsePointerImportData(importString) {
|
|
|
144
145
|
assert(parts.length >= 2);
|
|
145
146
|
const exportName = parts[parts.length - 1];
|
|
146
147
|
const importPath = parts.slice(0, -1).join(SEP);
|
|
148
|
+
if (importPath.startsWith('.') && !(importPath.startsWith('./') || importPath.startsWith('../'))) {
|
|
149
|
+
assert(!importStringWasGenerated);
|
|
150
|
+
assertUsage(false, `Invalid relative import path ${pc.code(importPath)} defined by ${pc.code(JSON.stringify(importString))} because it should start with ${pc.code('./')} or ${pc.code('../')}, or use an npm package import instead.`);
|
|
151
|
+
}
|
|
152
|
+
assertPointerImportPath(importPath);
|
|
147
153
|
return { importPath, exportName, importStringWasGenerated, importString };
|
|
148
154
|
}
|
|
155
|
+
// `importPath` is one of the following:
|
|
156
|
+
// - A relative import path
|
|
157
|
+
// - An npm package import
|
|
158
|
+
// - A filesystem absolute path, see transpileWithEsbuild()
|
|
159
|
+
function assertPointerImportPath(importPath) {
|
|
160
|
+
return isImportPath(importPath) || isFilePathAbsolute(importPath);
|
|
161
|
+
}
|
|
149
162
|
function spliceMany(str, operations) {
|
|
150
163
|
let strMod = '';
|
|
151
164
|
let endPrev;
|
|
@@ -2,7 +2,7 @@ export { resolvePointerImport };
|
|
|
2
2
|
export { resolvePointerImportData };
|
|
3
3
|
export type { PointerImport };
|
|
4
4
|
import type { DefinedAtFilePath } from '../../../../../../shared/page-configs/PageConfig.js';
|
|
5
|
-
import { type PointerImportData } from './
|
|
5
|
+
import { type PointerImportData } from './pointerImports.js';
|
|
6
6
|
import type { FilePath, FilePathResolved } from '../../../../../../shared/page-configs/FilePath.js';
|
|
7
7
|
type PointerImport = {
|
|
8
8
|
fileExportPath: FileExportPath;
|