vite 4.0.0-alpha.2 → 4.0.0-alpha.3

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-f5aa12ea.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:url';
8
8
  import 'node:module';
@@ -719,7 +719,7 @@ cli
719
719
  filterDuplicateOptions(options);
720
720
  // output structure is preserved even after bundling so require()
721
721
  // is ok here
722
- const { createServer } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.D; });
722
+ const { createServer } = await import('./chunks/dep-f5aa12ea.js').then(function (n) { return n.D; });
723
723
  try {
724
724
  const server = await createServer({
725
725
  root,
@@ -772,7 +772,7 @@ cli
772
772
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
773
773
  .action(async (root, options) => {
774
774
  filterDuplicateOptions(options);
775
- const { build } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.C; });
775
+ const { build } = await import('./chunks/dep-f5aa12ea.js').then(function (n) { return n.C; });
776
776
  const buildOptions = cleanOptions(options);
777
777
  try {
778
778
  await build({
@@ -800,7 +800,7 @@ cli
800
800
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
801
801
  .action(async (root, options) => {
802
802
  filterDuplicateOptions(options);
803
- const { optimizeDeps } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.B; });
803
+ const { optimizeDeps } = await import('./chunks/dep-f5aa12ea.js').then(function (n) { return n.B; });
804
804
  try {
805
805
  const config = await resolveConfig({
806
806
  root,
@@ -825,7 +825,7 @@ cli
825
825
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
826
826
  .action(async (root, options) => {
827
827
  filterDuplicateOptions(options);
828
- const { preview } = await import('./chunks/dep-b8ca7cde.js').then(function (n) { return n.E; });
828
+ const { preview } = await import('./chunks/dep-f5aa12ea.js').then(function (n) { return n.E; });
829
829
  try {
830
830
  const server = await preview({
831
831
  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-f5aa12ea.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.3",
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",