vite 4.3.0-beta.4 → 4.3.0-beta.5

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 { D as commonjsGlobal } from './dep-a36bfc56.js';
3
+ import { D as commonjsGlobal } from './dep-a26366f0.js';
4
4
  import require$$0$1 from 'path';
5
5
  import require$$5 from 'crypto';
6
6
  import require$$0$2 from 'util';
@@ -23009,11 +23009,11 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr = f
23009
23009
  if (dedupe?.includes(pkgId)) {
23010
23010
  basedir = root;
23011
23011
  }
23012
- else if (importer && path$o.isAbsolute(importer)) {
23012
+ else if (importer &&
23013
+ path$o.isAbsolute(importer) &&
23014
+ // css processing appends `*` for importer
23015
+ (importer[importer.length - 1] === '*' || fs$l.existsSync(cleanUrl(importer)))) {
23013
23016
  basedir = path$o.dirname(importer);
23014
- if (!fs$l.existsSync(basedir)) {
23015
- basedir = root;
23016
- }
23017
23017
  }
23018
23018
  else {
23019
23019
  basedir = root;
@@ -38485,7 +38485,7 @@ function createCachedImport(imp) {
38485
38485
  };
38486
38486
  }
38487
38487
  const importPostcssImport = createCachedImport(() => import('./dep-e3f470e2.js').then(function (n) { return n.i; }));
38488
- const importPostcssModules = createCachedImport(() => import('./dep-a4107a1b.js').then(function (n) { return n.i; }));
38488
+ const importPostcssModules = createCachedImport(() => import('./dep-970ed287.js').then(function (n) { return n.i; }));
38489
38489
  const importPostcss = createCachedImport(() => import('postcss'));
38490
38490
  /**
38491
38491
  * @experimental
@@ -45511,7 +45511,7 @@ function send$2(req, res, content, type, options) {
45511
45511
  // https://github.com/vitejs/vite/issues/2820#issuecomment-812495079
45512
45512
  const ROOT_FILES = [
45513
45513
  // '.git',
45514
- // https://pnpm.js.org/workspaces/
45514
+ // https://pnpm.io/workspaces/
45515
45515
  'pnpm-workspace.yaml',
45516
45516
  // https://rushjs.io/pages/advanced/config_files/
45517
45517
  // 'rush.json',
@@ -45988,7 +45988,7 @@ function onRollupWarning(warning, warn, config) {
45988
45988
  dynamicImportWarningIgnoreList.some((msg) => warning.message.includes(msg))) {
45989
45989
  return;
45990
45990
  }
45991
- if (!warningIgnoreList.includes(warning.code)) {
45991
+ if (warningIgnoreList.includes(warning.code)) {
45992
45992
  return;
45993
45993
  }
45994
45994
  if (warning.code === 'PLUGIN_WARNING') {
@@ -52659,12 +52659,7 @@ async function resolveHttpsConfig(https) {
52659
52659
  }
52660
52660
  async function readFileIfExists(value) {
52661
52661
  if (typeof value === 'string') {
52662
- try {
52663
- return fsp.readFile(path$o.resolve(value));
52664
- }
52665
- catch (e) {
52666
- return value;
52667
- }
52662
+ return fsp.readFile(path$o.resolve(value)).catch(() => value);
52668
52663
  }
52669
52664
  return value;
52670
52665
  }
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 { B as picocolorsExports, C as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-a36bfc56.js';
5
+ import { B as picocolorsExports, C as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-a26366f0.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-a36bfc56.js').then(function (n) { return n.G; });
731
+ const { createServer } = await import('./chunks/dep-a26366f0.js').then(function (n) { return n.G; });
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-a36bfc56.js').then(function (n) { return n.F; });
809
+ const { build } = await import('./chunks/dep-a26366f0.js').then(function (n) { return n.F; });
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-a36bfc56.js').then(function (n) { return n.E; });
837
+ const { optimizeDeps } = await import('./chunks/dep-a26366f0.js').then(function (n) { return n.E; });
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-a36bfc56.js').then(function (n) { return n.H; });
863
+ const { preview } = await import('./chunks/dep-a26366f0.js').then(function (n) { return n.H; });
864
864
  try {
865
865
  const server = await preview({
866
866
  root,
@@ -1,5 +1,5 @@
1
- import { i as isInNodeModules } from './chunks/dep-a36bfc56.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, l as loadConfigFromFile, z 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, A as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-a36bfc56.js';
1
+ import { i as isInNodeModules } from './chunks/dep-a26366f0.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, l as loadConfigFromFile, z 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, A as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-a26366f0.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';
@@ -3866,7 +3866,7 @@ function createLogger(level = 'info', options = {}) {
3866
3866
  // https://github.com/vitejs/vite/issues/2820#issuecomment-812495079
3867
3867
  const ROOT_FILES = [
3868
3868
  // '.git',
3869
- // https://pnpm.js.org/workspaces/
3869
+ // https://pnpm.io/workspaces/
3870
3870
  'pnpm-workspace.yaml',
3871
3871
  // https://rushjs.io/pages/advanced/config_files/
3872
3872
  // 'rush.json',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.3.0-beta.4",
3
+ "version": "4.3.0-beta.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",