vite 3.1.1 → 3.1.2

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,5 +1,5 @@
1
1
  import require$$0$1 from 'postcss';
2
- import { z as commonjsGlobal } from './dep-a713b95d.js';
2
+ import { z as commonjsGlobal } from './dep-cff57044.js';
3
3
  import require$$0 from 'path';
4
4
  import require$$5 from 'crypto';
5
5
  import require$$0__default from 'fs';
@@ -34236,7 +34236,7 @@ function resolvePlugin(resolveOptions) {
34236
34236
  nodeModulesInPathRE.test(normalizePath$3(resolved));
34237
34237
  if (isNodeModule && !resolved.match(DEP_VERSION_RE)) {
34238
34238
  const versionHash = depsOptimizer.metadata.browserHash;
34239
- if (versionHash && OPTIMIZABLE_ENTRY_RE.test(resolved)) {
34239
+ if (versionHash && isOptimizable(resolved, depsOptimizer.options)) {
34240
34240
  resolved = injectQuery(resolved, `v=${versionHash}`);
34241
34241
  }
34242
34242
  }
@@ -34629,7 +34629,9 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr, ex
34629
34629
  return { id: resolved };
34630
34630
  }
34631
34631
  // if we reach here, it's a valid dep import that hasn't been optimized.
34632
- const isJsType = OPTIMIZABLE_ENTRY_RE.test(resolved);
34632
+ const isJsType = depsOptimizer
34633
+ ? isOptimizable(resolved, depsOptimizer.options)
34634
+ : OPTIMIZABLE_ENTRY_RE.test(resolved);
34633
34635
  let exclude = depsOptimizer?.options.exclude;
34634
34636
  let include = depsOptimizer?.options.exclude;
34635
34637
  if (options.ssrOptimizeCheck) {
@@ -44485,7 +44487,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
44485
44487
  logger: config.logger
44486
44488
  }));
44487
44489
  if (isModule) {
44488
- postcssPlugins.unshift((await import('./dep-57f3662c.js').then(function (n) { return n.i; })).default({
44490
+ postcssPlugins.unshift((await import('./dep-b9b42dbd.js').then(function (n) { return n.i; })).default({
44489
44491
  ...modulesOptions,
44490
44492
  getJSON(cssFileName, _modules, outputFileName) {
44491
44493
  modules = _modules;
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-a713b95d.js';
3
+ import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-cff57044.js';
4
4
  import { VERSION } from './constants.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
@@ -695,7 +695,7 @@ cli
695
695
  .action(async (root, options) => {
696
696
  // output structure is preserved even after bundling so require()
697
697
  // is ok here
698
- const { createServer } = await import('./chunks/dep-a713b95d.js').then(function (n) { return n.C; });
698
+ const { createServer } = await import('./chunks/dep-cff57044.js').then(function (n) { return n.C; });
699
699
  try {
700
700
  const server = await createServer({
701
701
  root,
@@ -742,7 +742,7 @@ cli
742
742
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
743
743
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
744
744
  .action(async (root, options) => {
745
- const { build } = await import('./chunks/dep-a713b95d.js').then(function (n) { return n.B; });
745
+ const { build } = await import('./chunks/dep-cff57044.js').then(function (n) { return n.B; });
746
746
  const buildOptions = cleanOptions(options);
747
747
  try {
748
748
  await build({
@@ -766,7 +766,7 @@ cli
766
766
  .command('optimize [root]', 'pre-bundle dependencies')
767
767
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
768
768
  .action(async (root, options) => {
769
- const { optimizeDeps } = await import('./chunks/dep-a713b95d.js').then(function (n) { return n.A; });
769
+ const { optimizeDeps } = await import('./chunks/dep-cff57044.js').then(function (n) { return n.A; });
770
770
  try {
771
771
  const config = await resolveConfig({
772
772
  root,
@@ -789,7 +789,7 @@ cli
789
789
  .option('--https', `[boolean] use TLS + HTTP/2`)
790
790
  .option('--open [path]', `[boolean | string] open browser on startup`)
791
791
  .action(async (root, options) => {
792
- const { preview } = await import('./chunks/dep-a713b95d.js').then(function (n) { return n.D; });
792
+ const { preview } = await import('./chunks/dep-cff57044.js').then(function (n) { return n.D; });
793
793
  try {
794
794
  const server = await preview({
795
795
  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.1.1";
4
+ var version = "3.1.2";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -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-a713b95d.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-cff57044.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.1.1";
34
+ var version = "3.1.2";
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.1.1",
3
+ "version": "3.1.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",