vite 4.0.0-alpha.2 → 4.0.0-alpha.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.
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-b8ca7cde.js';
5
+ import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-b73c4a2f.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:url';
8
8
  import 'node:module';
@@ -32,6 +32,7 @@ import 'https';
32
32
  import 'tls';
33
33
  import 'node:http';
34
34
  import 'node:https';
35
+ import 'rollup';
35
36
  import 'querystring';
36
37
  import 'node:readline';
37
38
  import 'node:child_process';
@@ -719,7 +720,7 @@ cli
719
720
  filterDuplicateOptions(options);
720
721
  // output structure is preserved even after bundling so require()
721
722
  // is ok here
722
- const { createServer } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.D; });
723
+ const { createServer } = await import('./chunks/dep-b73c4a2f.js').then(function (n) { return n.D; });
723
724
  try {
724
725
  const server = await createServer({
725
726
  root,
@@ -772,7 +773,7 @@ cli
772
773
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
773
774
  .action(async (root, options) => {
774
775
  filterDuplicateOptions(options);
775
- const { build } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.C; });
776
+ const { build } = await import('./chunks/dep-b73c4a2f.js').then(function (n) { return n.C; });
776
777
  const buildOptions = cleanOptions(options);
777
778
  try {
778
779
  await build({
@@ -800,7 +801,7 @@ cli
800
801
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
801
802
  .action(async (root, options) => {
802
803
  filterDuplicateOptions(options);
803
- const { optimizeDeps } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.B; });
804
+ const { optimizeDeps } = await import('./chunks/dep-b73c4a2f.js').then(function (n) { return n.B; });
804
805
  try {
805
806
  const config = await resolveConfig({
806
807
  root,
@@ -825,7 +826,7 @@ cli
825
826
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
826
827
  .action(async (root, options) => {
827
828
  filterDuplicateOptions(options);
828
- const { preview } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.E; });
829
+ const { preview } = await import('./chunks/dep-b73c4a2f.js').then(function (n) { return n.E; });
829
830
  try {
830
831
  const server = await preview({
831
832
  root,
@@ -37,8 +37,8 @@ const DEFAULT_CONFIG_FILES = [
37
37
  'vite.config.cts'
38
38
  ];
39
39
  const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
40
- const OPTIMIZABLE_ENTRY_RE = /\.(?:[cm]?[jt]s)$/;
41
- const SPECIAL_QUERY_RE = /[\?&](?:worker|sharedworker|raw|url)\b/;
40
+ const OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
41
+ const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
42
42
  /**
43
43
  * Prefix for resolved fs paths, since windows paths may not be valid as URLs.
44
44
  */
@@ -104,7 +104,7 @@ const KNOWN_ASSET_TYPES = [
104
104
  'txt'
105
105
  ];
106
106
  const DEFAULT_ASSETS_RE = new RegExp(`\\.(` + KNOWN_ASSET_TYPES.join('|') + `)(\\?.*)?$`);
107
- const DEP_VERSION_RE = /[\?&](v=[\w\.-]+)\b/;
107
+ const DEP_VERSION_RE = /[?&](v=[\w.-]+)\b/;
108
108
  const loopbackHosts = new Set([
109
109
  'localhost',
110
110
  '127.0.0.1',
@@ -1151,6 +1151,7 @@ export declare interface InternalResolveOptions extends Required<ResolveOptions>
1151
1151
  ssrOptimizeCheck?: boolean;
1152
1152
  getDepsOptimizer?: (ssr: boolean) => DepsOptimizer | undefined;
1153
1153
  shouldExternalize?: (id: string) => boolean | undefined;
1154
+ isHookNodeResolve?: boolean;
1154
1155
  }
1155
1156
 
1156
1157
  export { InvalidatePayload }
@@ -1,4 +1,4 @@
1
- export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-b8ca7cde.js';
1
+ export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-b73c4a2f.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';
@@ -39,7 +39,7 @@ import 'node:child_process';
39
39
  import 'node:zlib';
40
40
 
41
41
  // This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
42
- const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)`;
42
+ const cssLangs = `\\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\\?)`;
43
43
  const cssLangRE = new RegExp(cssLangs);
44
44
  const isCSSRequest = (request) => cssLangRE.test(request);
45
45
  // Use splitVendorChunkPlugin() to get the same manualChunks strategy as Vite 2.7
@@ -26,7 +26,7 @@ path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
26
26
  path$3.dirname(CLIENT_ENTRY);
27
27
 
28
28
  // This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
29
- const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)`;
29
+ const cssLangs = `\\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\\?)`;
30
30
  const cssLangRE = new RegExp(cssLangs);
31
31
  const isCSSRequest = (request) => cssLangRE.test(request);
32
32
  // Use splitVendorChunkPlugin() to get the same manualChunks strategy as Vite 2.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.0.0-alpha.2",
3
+ "version": "4.0.0-alpha.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -59,7 +59,7 @@
59
59
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
60
60
  "dependencies": {
61
61
  "esbuild": "^0.15.9",
62
- "postcss": "^8.4.18",
62
+ "postcss": "^8.4.19",
63
63
  "resolve": "^1.22.1",
64
64
  "rollup": "~3.3.0"
65
65
  },
@@ -68,14 +68,14 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@ampproject/remapping": "^2.2.0",
71
- "@babel/parser": "^7.20.2",
71
+ "@babel/parser": "^7.20.3",
72
72
  "@babel/types": "^7.20.2",
73
73
  "@jridgewell/trace-mapping": "^0.3.17",
74
74
  "@rollup/plugin-alias": "^4.0.2",
75
75
  "@rollup/plugin-commonjs": "^23.0.2",
76
76
  "@rollup/plugin-dynamic-import-vars": "^2.0.1",
77
77
  "@rollup/plugin-json": "^5.0.1",
78
- "@rollup/plugin-node-resolve": "14.1.0",
78
+ "@rollup/plugin-node-resolve": "15.0.1",
79
79
  "@rollup/plugin-typescript": "^8.5.0",
80
80
  "@rollup/pluginutils": "^4.2.1",
81
81
  "acorn": "^8.8.1",