vike 0.4.242-commit-33026dc → 0.4.242-commit-4a9fae0

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.
@@ -3,14 +3,12 @@ export { handleAssetsManifest_getBuildConfig };
3
3
  export { handleAssetsManifest_isFixEnabled };
4
4
  export { handleAssetsManifest_assertUsageCssCodeSplit };
5
5
  export { handleAssetsManifest_assertUsageCssTarget };
6
- export { handleAssetsManifest_workaroundCssTarget_part1 };
7
- export { handleAssetsManifest_workaroundCssTarget_part2 };
6
+ export { handleAssetsManifest_alignCssTarget };
8
7
  import type { Environment, ResolvedConfig, Rollup } from 'vite';
9
8
  type Bundle = Rollup.OutputBundle;
10
9
  declare function handleAssetsManifest_isFixEnabled(): boolean;
11
10
  declare function handleAssetsManifest_assertUsageCssCodeSplit(config: ResolvedConfig): void;
12
- declare function handleAssetsManifest_workaroundCssTarget_part1(config: ResolvedConfig): void;
13
- declare function handleAssetsManifest_workaroundCssTarget_part2(): void;
11
+ declare function handleAssetsManifest_alignCssTarget(config: ResolvedConfig): void;
14
12
  declare function handleAssetsManifest_assertUsageCssTarget(config: ResolvedConfig, env: Environment): void;
15
13
  declare function handleAssetsManifest_getBuildConfig(): Promise<{
16
14
  readonly ssrEmitAssets: true | undefined;
@@ -3,8 +3,7 @@ export { handleAssetsManifest_getBuildConfig };
3
3
  export { handleAssetsManifest_isFixEnabled };
4
4
  export { handleAssetsManifest_assertUsageCssCodeSplit };
5
5
  export { handleAssetsManifest_assertUsageCssTarget };
6
- export { handleAssetsManifest_workaroundCssTarget_part1 };
7
- export { handleAssetsManifest_workaroundCssTarget_part2 };
6
+ export { handleAssetsManifest_alignCssTarget };
8
7
  import fs from 'node:fs/promises';
9
8
  import fs_sync from 'node:fs';
10
9
  import path from 'node:path';
@@ -20,7 +19,6 @@ import { set_macro_ASSETS_MANIFEST } from './pluginProdBuildEntry.js';
20
19
  import { getManifestFilePathRelative } from '../../shared/getManifestFilePathRelative.js';
21
20
  const globalObject = getGlobalObject('handleAssetsManifest.ts', {
22
21
  assetsJsonFilePath: undefined,
23
- cssTarget: '__VIKE__UNSET',
24
22
  targetsAll: [],
25
23
  configsAll: [],
26
24
  });
@@ -221,15 +219,13 @@ function handleAssetsManifest_assertUsageCssCodeSplit(config) {
221
219
  return;
222
220
  assertWarning(config.build.cssCodeSplit, `${pc.cyan('build.cssCodeSplit')} shouldn't be set to ${pc.cyan('false')} (https://github.com/vikejs/vike/issues/1993)`, { onlyOnce: true });
223
221
  }
224
- function handleAssetsManifest_workaroundCssTarget_part1(config) {
222
+ function handleAssetsManifest_alignCssTarget(config) {
225
223
  globalObject.configsAll.push(config);
226
- if (!isViteServerSide_viteEnvOptional(config, undefined)) {
227
- globalObject.cssTarget = config.build.cssTarget;
228
- }
229
- }
230
- function handleAssetsManifest_workaroundCssTarget_part2() {
231
- assert(globalObject.cssTarget !== '__VIKE__UNSET');
232
- globalObject.configsAll.forEach((c) => (c.build.cssTarget = globalObject.cssTarget));
224
+ const { cssTarget } = globalObject.configsAll
225
+ .filter((c) => !isViteServerSide_viteEnvOptional(c, undefined))
226
+ .at(-1).build;
227
+ assert(cssTarget);
228
+ globalObject.configsAll.forEach((c) => (c.build.cssTarget = cssTarget));
233
229
  }
234
230
  function handleAssetsManifest_assertUsageCssTarget(config, env) {
235
231
  if (!handleAssetsManifest_isFixEnabled())
@@ -113,9 +113,6 @@ function pluginBuildApp() {
113
113
  handler() {
114
114
  onSetupBuild();
115
115
  handleAssetsManifest_assertUsageCssTarget(config, this.environment);
116
- /* Let vike:build:pluginBuildApp force exit
117
- runPrerender_forceExit()
118
- */
119
116
  },
120
117
  },
121
118
  },
@@ -10,31 +10,18 @@ import { prependEntriesDir } from '../../../shared/prependEntriesDir.js';
10
10
  import { getFilePathResolved } from '../../shared/getFilePath.js';
11
11
  import { getConfigValueBuildTime } from '../../../../shared/page-configs/getConfigValueBuildTime.js';
12
12
  import { isViteServerSide_viteEnvOptional } from '../../shared/isViteServerSide.js';
13
- import { handleAssetsManifest_assertUsageCssCodeSplit, handleAssetsManifest_getBuildConfig, handleAssetsManifest_workaroundCssTarget_part1, handleAssetsManifest_workaroundCssTarget_part2, } from './handleAssetsManifest.js';
13
+ import { handleAssetsManifest_assertUsageCssCodeSplit, handleAssetsManifest_getBuildConfig, handleAssetsManifest_alignCssTarget, } from './handleAssetsManifest.js';
14
14
  import { resolveIncludeAssetsImportedByServer } from '../../../runtime/renderPage/getPageAssets/retrievePageAssetsProd.js';
15
15
  function pluginBuildConfig() {
16
- let config;
17
16
  return [
18
- {
19
- name: 'vike:build:pluginBuildConfig:post1',
20
- apply: 'build',
21
- enforce: 'post',
22
- configResolved: {
23
- order: 'post',
24
- handler(config_) {
25
- config = config_;
26
- handleAssetsManifest_workaroundCssTarget_part1(config);
27
- },
28
- },
29
- },
30
17
  {
31
18
  name: 'vike:build:pluginBuildConfig:post2',
32
19
  apply: 'build',
33
20
  enforce: 'post',
34
21
  configResolved: {
35
22
  order: 'post',
36
- async handler() {
37
- handleAssetsManifest_workaroundCssTarget_part2();
23
+ async handler(config) {
24
+ handleAssetsManifest_alignCssTarget(config);
38
25
  onSetupBuild();
39
26
  assertRollupInput(config);
40
27
  const entries = await getEntries(config);
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.242-commit-33026dc";
1
+ export declare const PROJECT_VERSION: "0.4.242-commit-4a9fae0";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.242-commit-33026dc';
2
+ export const PROJECT_VERSION = '0.4.242-commit-4a9fae0';
@@ -54,6 +54,10 @@ function parseUrl(url, baseServer) {
54
54
  const { hostname, port } = parseHost(host, url);
55
55
  // decode after setting href
56
56
  pathname = decodePathname(pathname);
57
+ /* Should it be `pathname` or `pathnameOriginal`? https://github.com/vikejs/vike/pull/2770
58
+ // pageContext.urlParsed.path
59
+ const path = pathname + (searchOriginal || '') + (hashOriginal || '')
60
+ */
57
61
  assert(pathname.startsWith('/'));
58
62
  return {
59
63
  href,
@@ -1,2 +1 @@
1
- export { unique };
2
- declare function unique<T>(arr: T[]): T[];
1
+ export declare function unique<T>(arr: T[]): T[];
@@ -1,4 +1,3 @@
1
- export { unique };
2
- function unique(arr) {
1
+ export function unique(arr) {
3
2
  return Array.from(new Set(arr));
4
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.242-commit-33026dc",
3
+ "version": "0.4.242-commit-4a9fae0",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -245,7 +245,7 @@
245
245
  "@types/picomatch": "^3.0.2",
246
246
  "@types/semver": "^7.5.8",
247
247
  "@types/source-map-support": "^0.5.10",
248
- "react-streaming": "^0.4.3",
248
+ "react-streaming": "^0.4.10",
249
249
  "rimraf": "^5.0.5",
250
250
  "typescript": "^5.9.2",
251
251
  "vite": "^7.1.5"