vike 0.4.246-commit-194db5c → 0.4.246-commit-abafe24
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,6 +1,6 @@
|
|
|
1
1
|
export { determineOptimizeDeps };
|
|
2
2
|
import { findPageFiles } from '../../shared/findPageFiles.js';
|
|
3
|
-
import { assert, assertIsImportPathNpmPackage, createDebugger, getNpmPackageName, isArray, isFilePathAbsoluteFilesystem, isVirtualFileId, } from '../../utils.js';
|
|
3
|
+
import { assert, assertIsImportPathNpmPackage, createDebugger, getNpmPackageName, isArray, isFilePathAbsoluteFilesystem, isVirtualFileId, requireResolveOptional, } from '../../utils.js';
|
|
4
4
|
import { getVikeConfigInternal } from '../../shared/resolveVikeConfigInternal.js';
|
|
5
5
|
import { analyzeClientEntries } from '../build/pluginBuildConfig.js';
|
|
6
6
|
import { virtualFileIdGlobalEntryClientCR, virtualFileIdGlobalEntryClientSR } from '../../../shared/virtualFileId.js';
|
|
@@ -11,14 +11,17 @@ async function determineOptimizeDeps(config) {
|
|
|
11
11
|
const vikeConfig = await getVikeConfigInternal();
|
|
12
12
|
const { _pageConfigs: pageConfigs } = vikeConfig;
|
|
13
13
|
const { entriesClient, entriesServer, includeClient, includeServer } = await getPageDeps(config, pageConfigs);
|
|
14
|
-
config.optimizeDeps.include = add(config.optimizeDeps.include, includeClient);
|
|
15
|
-
config.optimizeDeps.entries = add(config.optimizeDeps.entries, entriesClient);
|
|
16
14
|
// Workaround for https://github.com/vitejs/vite-plugin-react/issues/650
|
|
17
15
|
// - The issue was closed as completed with https://github.com/vitejs/vite/pull/20495 but it doesn't fix the issue and the workaround is still needed.
|
|
18
16
|
// - TO-DO/eventually: try removing the workaround and see if the CI fails (at test/@cloudflare_vite-plugin/) — maybe the issue will get fixed at some point.
|
|
19
17
|
includeServer.push('react/jsx-dev-runtime');
|
|
20
|
-
|
|
18
|
+
// Workaround for https://github.com/vikejs/vike/issues/2823#issuecomment-3514325487
|
|
21
19
|
includeServer.push('@compiled/react/runtime');
|
|
20
|
+
if (requireResolveOptional({ importPath: '@compiled/react/runtime', userRootDir: config.root, importerFilePath: null })) {
|
|
21
|
+
includeClient.push('@compiled/react/runtime');
|
|
22
|
+
}
|
|
23
|
+
config.optimizeDeps.include = add(config.optimizeDeps.include, includeClient);
|
|
24
|
+
config.optimizeDeps.entries = add(config.optimizeDeps.entries, entriesClient);
|
|
22
25
|
for (const envName in config.environments) {
|
|
23
26
|
const env = config.environments[envName];
|
|
24
27
|
if (env.consumer === 'server' && env.optimizeDeps.noDiscovery === false) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.246-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.246-commit-abafe24";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.246-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.246-commit-abafe24';
|
|
@@ -5,7 +5,7 @@ export { requireResolveDistFile };
|
|
|
5
5
|
export { getPackageNodeModulesDirectory };
|
|
6
6
|
declare function requireResolveOptional({ importPath, importerFilePath, userRootDir, }: {
|
|
7
7
|
importPath: string;
|
|
8
|
-
importerFilePath: string;
|
|
8
|
+
importerFilePath: string | null;
|
|
9
9
|
userRootDir: string;
|
|
10
10
|
}): string | null;
|
|
11
11
|
declare function requireResolveOptionalDir({ importPath, importerDir, userRootDir, }: {
|