vike 0.4.267-commit-e667e7c → 0.4.267-commit-83049a4

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.
@@ -505,12 +505,19 @@ function getConfigExecutionErrorIntroMsg(err) {
505
505
  const errIntroMsg = execErrIntroMsg.get(err);
506
506
  return errIntroMsg ?? null;
507
507
  }
508
+ const processId = crypto.randomUUID();
508
509
  function getTemporaryBuildFilePath(filePathAbsoluteFilesystem, code) {
509
510
  assertPosixPath(filePathAbsoluteFilesystem);
510
511
  const fileDir = path.posix.dirname(filePathAbsoluteFilesystem);
511
512
  const filename = path.posix.basename(filePathAbsoluteFilesystem);
512
- // Using content hash in file path, so that the cache of dynamic `import()` behaves as we want.
513
- const fileHash = crypto.createHash('md5').update(code).digest('hex').slice(0, 12);
513
+ const fileHash = crypto
514
+ .createHash('md5')
515
+ // Using content hash in file path, so that the cache of dynamic `import()` behaves as we want.
516
+ .update(code)
517
+ // Parallel processes shouldn't overwrite each other's temporary file
518
+ .update(processId)
519
+ .digest('hex')
520
+ .slice(0, 12);
514
521
  // Syntax with semicolon `build:${/*...*/}` doesn't work on Windows: https://github.com/vikejs/vike/issues/800#issuecomment-1517329455
515
522
  const filePathTmp = path.posix.join(fileDir, `${filename}.build-${fileHash}.mjs`);
516
523
  assert(isTemporaryBuildFile(filePathTmp));
@@ -1382,7 +1382,9 @@ async function resolvePrerenderContext(vikeConfig) {
1382
1382
  }
1383
1383
  function restartViteDevServer() {
1384
1384
  const viteDevServer = getViteDevServer();
1385
- assert(viteDevServer);
1385
+ // setViteEnvironmentNames() can reload Vike's config while Vite resolves its config, before the dev server exists
1386
+ if (!viteDevServer)
1387
+ return;
1386
1388
  swallowViteLogForceOptimization_enable();
1387
1389
  (async () => {
1388
1390
  try {
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: '0.4.267-commit-e667e7c';
1
+ export declare const PROJECT_VERSION: '0.4.267-commit-83049a4';
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.267-commit-e667e7c';
2
+ export const PROJECT_VERSION = '0.4.267-commit-83049a4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.267-commit-e667e7c",
3
+ "version": "0.4.267-commit-83049a4",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {