vite 5.4.6 → 5.4.18

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/LICENSE.md CHANGED
@@ -3,7 +3,7 @@ Vite is released under the MIT license:
3
3
 
4
4
  MIT License
5
5
 
6
- Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors
6
+ Copyright (c) 2019-present, VoidZero Inc. and Vite contributors
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -11,10 +11,10 @@
11
11
 
12
12
  Vite (French word for "fast", pronounced `/vit/`) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts:
13
13
 
14
- - A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vitejs.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vitejs.dev/guide/features.html#hot-module-replacement).
14
+ - A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement).
15
15
 
16
- - A [build command](https://vitejs.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
16
+ - A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
17
17
 
18
- In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/guide/api-plugin.html) and [JavaScript API](https://vitejs.dev/guide/api-javascript.html) with full typing support.
18
+ In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.
19
19
 
20
- [Read the Docs to Learn More](https://vitejs.dev).
20
+ [Read the Docs to Learn More](https://vite.dev).
@@ -500,6 +500,7 @@ const hmrPort = __HMR_PORT__;
500
500
  const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__}`;
501
501
  const directSocketHost = __HMR_DIRECT_TARGET__;
502
502
  const base = __BASE__ || "/";
503
+ const wsToken = __WS_TOKEN__;
503
504
  let socket;
504
505
  try {
505
506
  let fallback;
@@ -513,14 +514,14 @@ try {
513
514
  your current setup:
514
515
  (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)
515
516
  (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)
516
- Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .`
517
+ Check out your Vite / network configuration and https://vite.dev/config/server-options.html#server-hmr .`
517
518
  );
518
519
  });
519
520
  socket.addEventListener(
520
521
  "open",
521
522
  () => {
522
523
  console.info(
523
- "[vite] Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error."
524
+ "[vite] Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error."
524
525
  );
525
526
  },
526
527
  { once: true }
@@ -532,7 +533,10 @@ Check out your Vite / network configuration and https://vitejs.dev/config/server
532
533
  console.error(`[vite] failed to connect to websocket (${error}). `);
533
534
  }
534
535
  function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
535
- const socket2 = new WebSocket(`${protocol}://${hostAndPath}`, "vite-hmr");
536
+ const socket2 = new WebSocket(
537
+ `${protocol}://${hostAndPath}?token=${wsToken}`,
538
+ "vite-hmr"
539
+ );
536
540
  let isOpened = false;
537
541
  socket2.addEventListener(
538
542
  "open",
@@ -561,7 +565,7 @@ function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
561
565
  return socket2;
562
566
  }
563
567
  function cleanUrl(pathname) {
564
- const url = new URL(pathname, "http://vitejs.dev");
568
+ const url = new URL(pathname, "http://vite.dev");
565
569
  url.searchParams.delete("direct");
566
570
  return url.pathname + url.search;
567
571
  }
@@ -818,7 +822,7 @@ function injectQuery(url, queryToInject) {
818
822
  return url;
819
823
  }
820
824
  const pathname = url.replace(/[?#].*$/, "");
821
- const { search, hash } = new URL(url, "http://vitejs.dev");
825
+ const { search, hash } = new URL(url, "http://vite.dev");
822
826
  return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
823
827
  }
824
828
 
@@ -1,4 +1,4 @@
1
- import { B as getDefaultExportFromCjs } from './dep-DyBnyoVI.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-DbT5NFX0.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-IQS-Za7F.js';