vite 3.0.1 → 3.0.4

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,4 +1,4 @@
1
- import { A as getAugmentedNamespace, B as getDefaultExportFromCjs } from './dep-10d8d214.js';
1
+ import { A as getAugmentedNamespace, B as getDefaultExportFromCjs } from './dep-71eb12cb.js';
2
2
 
3
3
  import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
4
4
  import { dirname as __cjs_dirname } from 'node:path';
package/dist/node/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { EventEmitter } from 'events';
3
- import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-10d8d214.js';
3
+ import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-71eb12cb.js';
4
4
  import { VERSION } from './constants.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
@@ -694,7 +694,7 @@ cli
694
694
  .action(async (root, options) => {
695
695
  // output structure is preserved even after bundling so require()
696
696
  // is ok here
697
- const { createServer } = await import('./chunks/dep-10d8d214.js').then(function (n) { return n.E; });
697
+ const { createServer } = await import('./chunks/dep-71eb12cb.js').then(function (n) { return n.E; });
698
698
  try {
699
699
  const server = await createServer({
700
700
  root,
@@ -741,7 +741,7 @@ cli
741
741
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
742
742
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
743
743
  .action(async (root, options) => {
744
- const { build } = await import('./chunks/dep-10d8d214.js').then(function (n) { return n.D; });
744
+ const { build } = await import('./chunks/dep-71eb12cb.js').then(function (n) { return n.D; });
745
745
  const buildOptions = cleanOptions(options);
746
746
  try {
747
747
  await build({
@@ -765,7 +765,7 @@ cli
765
765
  .command('optimize [root]', 'pre-bundle dependencies')
766
766
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
767
767
  .action(async (root, options) => {
768
- const { optimizeDeps } = await import('./chunks/dep-10d8d214.js').then(function (n) { return n.C; });
768
+ const { optimizeDeps } = await import('./chunks/dep-71eb12cb.js').then(function (n) { return n.C; });
769
769
  try {
770
770
  const config = await resolveConfig({
771
771
  root,
@@ -788,7 +788,7 @@ cli
788
788
  .option('--https', `[boolean] use TLS + HTTP/2`)
789
789
  .option('--open [path]', `[boolean | string] open browser on startup`)
790
790
  .action(async (root, options) => {
791
- const { preview } = await import('./chunks/dep-10d8d214.js').then(function (n) { return n.F; });
791
+ const { preview } = await import('./chunks/dep-71eb12cb.js').then(function (n) { return n.F; });
792
792
  try {
793
793
  const server = await preview({
794
794
  root,
@@ -1,7 +1,7 @@
1
1
  import path, { resolve } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
 
4
- var version = "3.0.1";
4
+ var version = "3.0.4";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -9,8 +9,9 @@ const DEFAULT_MAIN_FIELDS = [
9
9
  'jsnext:main',
10
10
  'jsnext'
11
11
  ];
12
- // Support browserslist
13
- // "defaults and supports es6-module and supports es6-module-dynamic-import",
12
+ // Baseline support browserslist
13
+ // "defaults and supports es6-module and supports es6-module-dynamic-import"
14
+ // Higher browser versions may be needed for extra features.
14
15
  const ESBUILD_MODULES_TARGET = [
15
16
  'es2020',
16
17
  'edge88',
@@ -21,6 +22,7 @@ const ESBUILD_MODULES_TARGET = [
21
22
  const DEFAULT_EXTENSIONS = [
22
23
  '.mjs',
23
24
  '.js',
25
+ '.mts',
24
26
  '.ts',
25
27
  '.jsx',
26
28
  '.tsx',
@@ -35,7 +37,7 @@ const DEFAULT_CONFIG_FILES = [
35
37
  'vite.config.cts'
36
38
  ];
37
39
  const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
38
- const OPTIMIZABLE_ENTRY_RE = /\.(?:(m|c)?js|ts)$/;
40
+ const OPTIMIZABLE_ENTRY_RE = /\.(?:[cm]?[jt]s)$/;
39
41
  const SPECIAL_QUERY_RE = /[\?&](?:worker|sharedworker|raw|url)\b/;
40
42
  /**
41
43
  * Prefix for resolved fs paths, since windows paths may not be valid as URLs.
@@ -543,7 +543,7 @@ export declare interface DepOptimizationConfig {
543
543
  * List of file extensions that can be optimized. A corresponding esbuild
544
544
  * plugin must exist to handle the specific extension.
545
545
  *
546
- * By default, Vite can optimize `.mjs`, `.js`, and `.ts` files. This option
546
+ * By default, Vite can optimize `.mjs`, `.js`, `.ts`, and `.mts` files. This option
547
547
  * allows specifying additional extensions.
548
548
  *
549
549
  * @experimental
@@ -616,7 +616,7 @@ export declare interface DepOptimizationProcessing {
616
616
  export declare interface DepOptimizationResult {
617
617
  metadata: DepOptimizationMetadata;
618
618
  /**
619
- * When doing a re-run, if there are newly discovered dependendencies
619
+ * When doing a re-run, if there are newly discovered dependencies
620
620
  * the page reload will be delayed until the next rerun so we need
621
621
  * to be able to discard the result
622
622
  */
@@ -677,14 +677,14 @@ export { esbuildVersion }
677
677
 
678
678
  export declare interface ExperimentalOptions {
679
679
  /**
680
- * Append fake `&lang.(ext)` when queries are specified, to preseve the file extension for following plugins to process.
680
+ * Append fake `&lang.(ext)` when queries are specified, to preserve the file extension for following plugins to process.
681
681
  *
682
682
  * @experimental
683
683
  * @default false
684
684
  */
685
685
  importGlobRestoreExtension?: boolean;
686
686
  /**
687
- * Allow finegrain contol over assets and public files paths
687
+ * Allow finegrain control over assets and public files paths
688
688
  *
689
689
  * @experimental
690
690
  */
@@ -1,4 +1,4 @@
1
- export { b as build, k as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, h as getDepOptimizationConfig, i as isDepsOptimizerEnabled, l as loadConfigFromFile, w as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, x as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-10d8d214.js';
1
+ export { b as build, k as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, h as getDepOptimizationConfig, i as isDepsOptimizerEnabled, l as loadConfigFromFile, w as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, x as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-71eb12cb.js';
2
2
  export { VERSION as version } from './constants.js';
3
3
  export { version as esbuildVersion } from 'esbuild';
4
4
  export { VERSION as rollupVersion } from 'rollup';
@@ -31,7 +31,7 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
31
31
  var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
32
32
  var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
33
33
 
34
- var version = "3.0.1";
34
+ var version = "3.0.4";
35
35
 
36
36
  const VERSION = version;
37
37
  const VITE_PACKAGE_DIR = path$3.resolve(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "3.0.1",
3
+ "version": "3.0.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -68,8 +68,8 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@ampproject/remapping": "^2.2.0",
71
- "@babel/parser": "^7.18.8",
72
- "@babel/types": "^7.18.8",
71
+ "@babel/parser": "^7.18.9",
72
+ "@babel/types": "^7.18.9",
73
73
  "@jridgewell/trace-mapping": "^0.3.14",
74
74
  "@rollup/plugin-alias": "^3.1.9",
75
75
  "@rollup/plugin-commonjs": "^22.0.1",
@@ -79,7 +79,7 @@
79
79
  "@rollup/plugin-typescript": "^8.3.3",
80
80
  "@rollup/pluginutils": "^4.2.1",
81
81
  "@vue/compiler-dom": "^3.2.37",
82
- "acorn": "^8.7.1",
82
+ "acorn": "^8.8.0",
83
83
  "cac": "^6.7.12",
84
84
  "chokidar": "^3.5.3",
85
85
  "connect": "^3.7.0",
@@ -99,7 +99,7 @@
99
99
  "launch-editor-middleware": "^2.4.0",
100
100
  "magic-string": "^0.26.2",
101
101
  "micromatch": "^4.0.5",
102
- "mlly": "^0.5.4",
102
+ "mlly": "^0.5.5",
103
103
  "mrmime": "^1.0.1",
104
104
  "okie": "^1.0.1",
105
105
  "open": "^8.4.0",
@@ -119,7 +119,7 @@
119
119
  "tslib": "^2.4.0",
120
120
  "types": "link:./types",
121
121
  "ufo": "^0.8.5",
122
- "ws": "^8.8.0"
122
+ "ws": "^8.8.1"
123
123
  },
124
124
  "peerDependencies": {
125
125
  "less": "*",
@@ -117,7 +117,7 @@ const codeframeRE = /^(?:>?\s+\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm
117
117
 
118
118
  // Allow `ErrorOverlay` to extend `HTMLElement` even in environments where
119
119
  // `HTMLElement` was not originally defined.
120
- const { HTMLElement = class {} } = globalThis
120
+ const { HTMLElement = class {} as typeof globalThis.HTMLElement } = globalThis
121
121
  export class ErrorOverlay extends HTMLElement {
122
122
  root: ShadowRoot
123
123
 
@@ -3,6 +3,7 @@
3
3
  "include": ["./", "../../types"],
4
4
  "compilerOptions": {
5
5
  "types": [],
6
+ "target": "ES2019",
6
7
  "lib": ["ESNext", "DOM"],
7
8
  "declaration": false
8
9
  }