vite 4.3.0 → 4.3.1

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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  import require$$0__default from 'fs';
2
2
  import require$$0 from 'postcss';
3
- import { E as commonjsGlobal } from './dep-33545781.js';
3
+ import { E as commonjsGlobal } from './dep-24daf00c.js';
4
4
  import require$$0$1 from 'path';
5
5
  import require$$5 from 'crypto';
6
6
  import require$$0$2 from 'util';
@@ -38564,7 +38564,7 @@ function createCachedImport(imp) {
38564
38564
  };
38565
38565
  }
38566
38566
  const importPostcssImport = createCachedImport(() => import('./dep-e3f470e2.js').then(function (n) { return n.i; }));
38567
- const importPostcssModules = createCachedImport(() => import('./dep-72c70ff9.js').then(function (n) { return n.i; }));
38567
+ const importPostcssModules = createCachedImport(() => import('./dep-17ff486c.js').then(function (n) { return n.i; }));
38568
38568
  const importPostcss = createCachedImport(() => import('postcss'));
38569
38569
  /**
38570
38570
  * @experimental
@@ -53272,10 +53272,6 @@ async function loadAndTransform(id, url, server, options, timestamp) {
53272
53272
  const file = cleanUrl(id);
53273
53273
  let code = null;
53274
53274
  let map = null;
53275
- // Ensure that the module is in the graph before it is loaded and the file is checked.
53276
- // This prevents errors from occurring during the load process and interrupting the watching process at its inception.
53277
- const mod = await moduleGraph.ensureEntryFromUrl(url, ssr);
53278
- ensureWatchedFile(watcher, mod.file, root);
53279
53275
  // load
53280
53276
  const loadStart = debugLoad ? performance$1.now() : 0;
53281
53277
  const loadResult = await pluginContainer.load(id, { ssr });
@@ -53340,6 +53336,9 @@ async function loadAndTransform(id, url, server, options, timestamp) {
53340
53336
  err.code = isPublicFile ? ERR_LOAD_PUBLIC_URL : ERR_LOAD_URL;
53341
53337
  throw err;
53342
53338
  }
53339
+ // ensure module in graph after successful load
53340
+ const mod = await moduleGraph.ensureEntryFromUrl(url, ssr);
53341
+ ensureWatchedFile(watcher, mod.file, root);
53343
53342
  // transform
53344
53343
  const transformStart = debugTransform ? performance$1.now() : 0;
53345
53344
  const transformResult = await pluginContainer.transform(code, id, {
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 { C as picocolorsExports, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-33545781.js';
5
+ import { C as picocolorsExports, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-24daf00c.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -728,7 +728,7 @@ cli
728
728
  filterDuplicateOptions(options);
729
729
  // output structure is preserved even after bundling so require()
730
730
  // is ok here
731
- const { createServer } = await import('./chunks/dep-33545781.js').then(function (n) { return n.H; });
731
+ const { createServer } = await import('./chunks/dep-24daf00c.js').then(function (n) { return n.H; });
732
732
  try {
733
733
  const server = await createServer({
734
734
  root,
@@ -806,7 +806,7 @@ cli
806
806
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
807
807
  .action(async (root, options) => {
808
808
  filterDuplicateOptions(options);
809
- const { build } = await import('./chunks/dep-33545781.js').then(function (n) { return n.G; });
809
+ const { build } = await import('./chunks/dep-24daf00c.js').then(function (n) { return n.G; });
810
810
  const buildOptions = cleanOptions(options);
811
811
  try {
812
812
  await build({
@@ -834,7 +834,7 @@ cli
834
834
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
835
835
  .action(async (root, options) => {
836
836
  filterDuplicateOptions(options);
837
- const { optimizeDeps } = await import('./chunks/dep-33545781.js').then(function (n) { return n.F; });
837
+ const { optimizeDeps } = await import('./chunks/dep-24daf00c.js').then(function (n) { return n.F; });
838
838
  try {
839
839
  const config = await resolveConfig({
840
840
  root,
@@ -860,7 +860,7 @@ cli
860
860
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
861
861
  .action(async (root, options) => {
862
862
  filterDuplicateOptions(options);
863
- const { preview } = await import('./chunks/dep-33545781.js').then(function (n) { return n.I; });
863
+ const { preview } = await import('./chunks/dep-24daf00c.js').then(function (n) { return n.I; });
864
864
  try {
865
865
  const server = await preview({
866
866
  root,
@@ -1,5 +1,5 @@
1
- import { i as isInNodeModules } from './chunks/dep-33545781.js';
2
- export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-33545781.js';
1
+ import { i as isInNodeModules } from './chunks/dep-24daf00c.js';
2
+ export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-24daf00c.js';
3
3
  export { VERSION as version } from './constants.js';
4
4
  export { version as esbuildVersion } from 'esbuild';
5
5
  export { VERSION as rollupVersion } from 'rollup';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",