vite 3.1.7 → 3.1.8
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/chunks/{dep-77359784.js → dep-30a6f29e.js} +1 -1
- package/dist/node/chunks/{dep-0ebb5606.js → dep-4da11a5e.js} +13 -12
- package/dist/node/cli.js +5 -5
- package/dist/node/constants.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node-cjs/publicUtils.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fs$l, { promises as promises$2 } from 'node:fs';
|
|
2
|
-
import path$n, { posix as posix$2, isAbsolute as isAbsolute$
|
|
2
|
+
import path$n, { posix as posix$2, isAbsolute as isAbsolute$2, resolve as resolve$6, join as join$2, relative as relative$2, dirname as dirname$2, basename as basename$2, extname as extname$1 } from 'node:path';
|
|
3
3
|
import { URL as URL$3, pathToFileURL, URLSearchParams, parse as parse$k } from 'node:url';
|
|
4
4
|
import { performance } from 'node:perf_hooks';
|
|
5
5
|
import { createRequire as createRequire$1, builtinModules } from 'node:module';
|
|
6
6
|
import require$$0$3 from 'tty';
|
|
7
7
|
import { transform as transform$2, build as build$3, formatMessages } from 'esbuild';
|
|
8
|
-
import require$$0$4, { sep, resolve as resolve$4, posix as posix$1, relative as relative$1, basename as basename$1, extname, dirname as dirname$1, join as join$1, win32 as win32$1, isAbsolute as isAbsolute$
|
|
8
|
+
import require$$0$4, { sep, resolve as resolve$4, posix as posix$1, relative as relative$1, basename as basename$1, extname, dirname as dirname$1, join as join$1, win32 as win32$1, isAbsolute as isAbsolute$1, normalize } from 'path';
|
|
9
9
|
import * as require$$0$2 from 'fs';
|
|
10
10
|
import require$$0__default, { existsSync, readFileSync, statSync as statSync$1, promises as promises$1, readdirSync } from 'fs';
|
|
11
11
|
import require$$0$5 from 'events';
|
|
@@ -4327,7 +4327,7 @@ function ownProp (obj, field) {
|
|
|
4327
4327
|
var fs$i = require$$0__default;
|
|
4328
4328
|
var path$i = require$$0$4;
|
|
4329
4329
|
var minimatch = minimatch_1;
|
|
4330
|
-
var isAbsolute
|
|
4330
|
+
var isAbsolute = pathIsAbsolute.exports;
|
|
4331
4331
|
var Minimatch = minimatch.Minimatch;
|
|
4332
4332
|
|
|
4333
4333
|
function alphasort (a, b) {
|
|
@@ -4415,7 +4415,7 @@ function setopts (self, pattern, options) {
|
|
|
4415
4415
|
|
|
4416
4416
|
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
|
|
4417
4417
|
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
|
|
4418
|
-
self.cwdAbs = isAbsolute
|
|
4418
|
+
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
|
|
4419
4419
|
if (process.platform === "win32")
|
|
4420
4420
|
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/");
|
|
4421
4421
|
self.nomount = !!options.nomount;
|
|
@@ -4514,7 +4514,7 @@ function makeAbs (self, f) {
|
|
|
4514
4514
|
var abs = f;
|
|
4515
4515
|
if (f.charAt(0) === '/') {
|
|
4516
4516
|
abs = path$i.join(self.root, f);
|
|
4517
|
-
} else if (isAbsolute
|
|
4517
|
+
} else if (isAbsolute(f) || f === '') {
|
|
4518
4518
|
abs = f;
|
|
4519
4519
|
} else if (self.changedCwd) {
|
|
4520
4520
|
abs = path$i.resolve(self.cwd, f);
|
|
@@ -11473,7 +11473,7 @@ const normalizePath$4 = function normalizePath(filename) {
|
|
|
11473
11473
|
};
|
|
11474
11474
|
|
|
11475
11475
|
function getMatcherString(id, resolutionBase) {
|
|
11476
|
-
if (resolutionBase === false || isAbsolute$
|
|
11476
|
+
if (resolutionBase === false || isAbsolute$1(id) || id.startsWith('*')) {
|
|
11477
11477
|
return normalizePath$4(id);
|
|
11478
11478
|
}
|
|
11479
11479
|
// resolve('') is valid and will default to process.cwd()
|
|
@@ -36038,7 +36038,7 @@ async function toAbsoluteGlob(glob, root, importer, resolveId) {
|
|
|
36038
36038
|
if (glob.startsWith('**'))
|
|
36039
36039
|
return pre + glob;
|
|
36040
36040
|
const resolved = normalizePath$3((await resolveId(glob, importer)) || glob);
|
|
36041
|
-
if (isAbsolute$
|
|
36041
|
+
if (isAbsolute$2(resolved)) {
|
|
36042
36042
|
return pre + globSafeResolvedPath(resolved, glob);
|
|
36043
36043
|
}
|
|
36044
36044
|
throw new Error(`Invalid glob: "${glob}" (resolved: "${resolved}"). It must start with '/' or './'`);
|
|
@@ -44520,7 +44520,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
44520
44520
|
logger: config.logger
|
|
44521
44521
|
}));
|
|
44522
44522
|
if (isModule) {
|
|
44523
|
-
postcssPlugins.unshift((await import('./dep-
|
|
44523
|
+
postcssPlugins.unshift((await import('./dep-30a6f29e.js').then(function (n) { return n.i; })).default({
|
|
44524
44524
|
...modulesOptions,
|
|
44525
44525
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
44526
44526
|
modules = _modules;
|
|
@@ -63464,7 +63464,11 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
63464
63464
|
};
|
|
63465
63465
|
build.onResolve({ filter: /.*/ }, ({ path: id, importer, kind }) => {
|
|
63466
63466
|
// externalize bare imports
|
|
63467
|
-
if (id[0] !== '.' && !isAbsolute(id)) {
|
|
63467
|
+
if (id[0] !== '.' && !path$n.isAbsolute(id) && !isBuiltin(id)) {
|
|
63468
|
+
// partial deno support as `npm:` does not work in `tryNodeResolve`
|
|
63469
|
+
if (id.startsWith('npm:')) {
|
|
63470
|
+
return { external: true };
|
|
63471
|
+
}
|
|
63468
63472
|
let idFsPath = tryNodeResolve(id, importer, options, false)?.id;
|
|
63469
63473
|
if (idFsPath && (isESM || kind === 'dynamic-import')) {
|
|
63470
63474
|
idFsPath = pathToFileURL(idFsPath).href;
|
|
@@ -63567,8 +63571,5 @@ function isDepsOptimizerEnabled(config, ssr) {
|
|
|
63567
63571
|
(command === 'build' && disabled === 'build') ||
|
|
63568
63572
|
(command === 'serve' && disabled === 'dev'));
|
|
63569
63573
|
}
|
|
63570
|
-
function isAbsolute(id) {
|
|
63571
|
-
return path$n.isAbsolute(id) || path$n.posix.isAbsolute(id);
|
|
63572
|
-
}
|
|
63573
63574
|
|
|
63574
63575
|
export { index$1 as A, build$1 as B, index as C, preview$1 as D, resolvePackageData as a, build as b, createServer as c, defineConfig as d, resolveConfig as e, formatPostcssSourceMap as f, resolveBaseUrl as g, getDepOptimizationConfig as h, isDepsOptimizerEnabled as i, mergeAlias as j, createFilter as k, loadConfigFromFile as l, mergeConfig as m, normalizePath$3 as n, optimizeDeps as o, preview as p, send as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, createLogger as u, searchForWorkspaceRoot as v, loadEnv as w, resolveEnvPrefix as x, picocolors as y, commonjsGlobal as z };
|
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-
|
|
3
|
+
import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-4da11a5e.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-
|
|
698
|
+
const { createServer } = await import('./chunks/dep-4da11a5e.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-
|
|
745
|
+
const { build } = await import('./chunks/dep-4da11a5e.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-
|
|
769
|
+
const { optimizeDeps } = await import('./chunks/dep-4da11a5e.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-
|
|
792
|
+
const { preview } = await import('./chunks/dep-4da11a5e.js').then(function (n) { return n.D; });
|
|
793
793
|
try {
|
|
794
794
|
const server = await preview({
|
|
795
795
|
root,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.js
CHANGED
|
@@ -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-
|
|
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-4da11a5e.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.
|
|
34
|
+
var version = "3.1.8";
|
|
35
35
|
|
|
36
36
|
const VERSION = version;
|
|
37
37
|
const VITE_PACKAGE_DIR = path$3.resolve(
|