vite 6.0.0-beta.6 → 6.0.0-beta.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/LICENSE.md +4 -279
- package/dist/node/chunks/{dep-DmJnO2SA.js → dep-DUn1iy3F.js} +6 -192
- package/dist/node/chunks/{dep-D4jOq5eU.js → dep-Ddvoc4zx.js} +9704 -16431
- package/dist/node/chunks/{dep-BBdZfOY1.js → dep-qU9-vqRp.js} +13 -13
- package/dist/node/cli.js +8 -7
- package/dist/node/constants.js +9 -1
- package/dist/node/index.d.ts +126 -223
- package/dist/node/index.js +5 -4
- package/dist/node-cjs/publicUtils.cjs +4 -3
- package/package.json +4 -8
@@ -1,9 +1,9 @@
|
|
1
|
-
import { M as commonjsGlobal, L as getDefaultExportFromCjs } from './dep-
|
2
|
-
import require$$0$
|
3
|
-
import require$$0
|
4
|
-
import
|
1
|
+
import { M as commonjsGlobal, L as getDefaultExportFromCjs } from './dep-Ddvoc4zx.js';
|
2
|
+
import require$$0$1 from 'fs';
|
3
|
+
import require$$0 from 'postcss';
|
4
|
+
import sysPath__default from 'path';
|
5
5
|
import require$$3 from 'crypto';
|
6
|
-
import require$$
|
6
|
+
import require$$1 from 'util';
|
7
7
|
import { r as requireLib } from './dep-mtw2NpNs.js';
|
8
8
|
|
9
9
|
import { createRequire as __cjs_createRequire } from 'node:module';
|
@@ -1126,9 +1126,9 @@ function requireFileSystemLoader () {
|
|
1126
1126
|
});
|
1127
1127
|
FileSystemLoader.default = void 0;
|
1128
1128
|
|
1129
|
-
var _postcss = _interopRequireDefault(require$$0
|
1129
|
+
var _postcss = _interopRequireDefault(require$$0);
|
1130
1130
|
|
1131
|
-
var _path = _interopRequireDefault(
|
1131
|
+
var _path = _interopRequireDefault(sysPath__default);
|
1132
1132
|
|
1133
1133
|
var _Parser = _interopRequireDefault(requireParser$1());
|
1134
1134
|
|
@@ -2157,7 +2157,7 @@ function requireInterpolateName () {
|
|
2157
2157
|
if (hasRequiredInterpolateName) return interpolateName_1;
|
2158
2158
|
hasRequiredInterpolateName = 1;
|
2159
2159
|
|
2160
|
-
const path =
|
2160
|
+
const path = sysPath__default;
|
2161
2161
|
const getHashDigest = requireGetHashDigest();
|
2162
2162
|
|
2163
2163
|
function interpolateName(loaderContext, name, options = {}) {
|
@@ -2282,7 +2282,7 @@ function requireGenericNames () {
|
|
2282
2282
|
hasRequiredGenericNames = 1;
|
2283
2283
|
|
2284
2284
|
var interpolateName = requireInterpolateName();
|
2285
|
-
var path =
|
2285
|
+
var path = sysPath__default;
|
2286
2286
|
|
2287
2287
|
/**
|
2288
2288
|
* @param {string} pattern
|
@@ -3631,7 +3631,7 @@ function requireNode () {
|
|
3631
3631
|
* For Node.js, simply re-export the core `util.deprecate` function.
|
3632
3632
|
*/
|
3633
3633
|
|
3634
|
-
node = require$$
|
3634
|
+
node = require$$1.deprecate;
|
3635
3635
|
return node;
|
3636
3636
|
}
|
3637
3637
|
|
@@ -5030,7 +5030,7 @@ function requireParser () {
|
|
5030
5030
|
}
|
5031
5031
|
// We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
|
5032
5032
|
var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
|
5033
|
-
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {
|
5033
|
+
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
|
5034
5034
|
var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
5035
5035
|
if (nodes.length > 0) {
|
5036
5036
|
var last = this.current.last;
|
@@ -7079,7 +7079,7 @@ function requirePluginFactory () {
|
|
7079
7079
|
});
|
7080
7080
|
pluginFactory.makePlugin = makePlugin;
|
7081
7081
|
|
7082
|
-
var _postcss = _interopRequireDefault(require$$0
|
7082
|
+
var _postcss = _interopRequireDefault(require$$0);
|
7083
7083
|
|
7084
7084
|
var _unquote = _interopRequireDefault(requireUnquote());
|
7085
7085
|
|
@@ -7188,7 +7188,7 @@ function requireBuild () {
|
|
7188
7188
|
if (hasRequiredBuild) return build.exports;
|
7189
7189
|
hasRequiredBuild = 1;
|
7190
7190
|
|
7191
|
-
var _fs = require$$0$
|
7191
|
+
var _fs = require$$0$1;
|
7192
7192
|
|
7193
7193
|
var _fs2 = requireFs();
|
7194
7194
|
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs__default from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { K as colors, E as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { K as colors, E as createLogger, r as resolveConfig } from './chunks/dep-Ddvoc4zx.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -19,6 +19,7 @@ import 'util';
|
|
19
19
|
import 'net';
|
20
20
|
import 'url';
|
21
21
|
import 'http';
|
22
|
+
import 'fs/promises';
|
22
23
|
import 'stream';
|
23
24
|
import 'os';
|
24
25
|
import 'child_process';
|
@@ -27,15 +28,15 @@ import 'node:crypto';
|
|
27
28
|
import 'node:dns';
|
28
29
|
import 'vite/module-runner';
|
29
30
|
import 'rollup/parseAst';
|
31
|
+
import 'module';
|
30
32
|
import 'node:readline';
|
31
33
|
import 'node:process';
|
32
34
|
import 'node:buffer';
|
33
|
-
import 'node:events';
|
34
35
|
import 'crypto';
|
35
|
-
import 'module';
|
36
36
|
import 'node:assert';
|
37
37
|
import 'node:v8';
|
38
38
|
import 'node:worker_threads';
|
39
|
+
import 'node:events';
|
39
40
|
import 'zlib';
|
40
41
|
import 'buffer';
|
41
42
|
import 'https';
|
@@ -740,7 +741,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
740
741
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
741
742
|
).action(async (root, options) => {
|
742
743
|
filterDuplicateOptions(options);
|
743
|
-
const { createServer } = await import('./chunks/dep-
|
744
|
+
const { createServer } = await import('./chunks/dep-Ddvoc4zx.js').then(function (n) { return n.O; });
|
744
745
|
try {
|
745
746
|
const server = await createServer({
|
746
747
|
root,
|
@@ -833,7 +834,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
833
834
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
834
835
|
async (root, options) => {
|
835
836
|
filterDuplicateOptions(options);
|
836
|
-
const { createBuilder } = await import('./chunks/dep-
|
837
|
+
const { createBuilder } = await import('./chunks/dep-Ddvoc4zx.js').then(function (n) { return n.P; });
|
837
838
|
const buildOptions = cleanGlobalCLIOptions(
|
838
839
|
cleanBuilderCLIOptions(options)
|
839
840
|
);
|
@@ -868,7 +869,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
868
869
|
).action(
|
869
870
|
async (root, options) => {
|
870
871
|
filterDuplicateOptions(options);
|
871
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
872
|
+
const { optimizeDeps } = await import('./chunks/dep-Ddvoc4zx.js').then(function (n) { return n.N; });
|
872
873
|
try {
|
873
874
|
const config = await resolveConfig(
|
874
875
|
{
|
@@ -894,7 +895,7 @@ ${e.stack}`),
|
|
894
895
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(
|
895
896
|
async (root, options) => {
|
896
897
|
filterDuplicateOptions(options);
|
897
|
-
const { preview } = await import('./chunks/dep-
|
898
|
+
const { preview } = await import('./chunks/dep-Ddvoc4zx.js').then(function (n) { return n.Q; });
|
898
899
|
try {
|
899
900
|
const server = await preview({
|
900
901
|
root,
|
package/dist/node/constants.js
CHANGED
@@ -42,6 +42,14 @@ const DEFAULT_MAIN_FIELDS = [
|
|
42
42
|
// moment still uses this...
|
43
43
|
"jsnext"
|
44
44
|
];
|
45
|
+
const DEV_PROD_CONDITION = `development|production`;
|
46
|
+
const DEFAULT_CONDITIONS = [
|
47
|
+
"module",
|
48
|
+
"browser",
|
49
|
+
"node",
|
50
|
+
DEV_PROD_CONDITION
|
51
|
+
];
|
52
|
+
const DEFAULT_EXTERNAL_CONDITIONS = ["node"];
|
45
53
|
const ESBUILD_MODULES_TARGET = [
|
46
54
|
"es2020",
|
47
55
|
// support import.meta.url
|
@@ -141,4 +149,4 @@ const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = "ERR_OPTIMIZE_DEPS_PROCESSING_ERROR";
|
|
141
149
|
const ERR_OUTDATED_OPTIMIZED_DEP = "ERR_OUTDATED_OPTIMIZED_DEP";
|
142
150
|
const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = "ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR";
|
143
151
|
|
144
|
-
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEFAULT_PREVIEW_PORT, DEP_VERSION_RE, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ERR_OUTDATED_OPTIMIZED_DEP, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, loopbackHosts, wildcardHosts };
|
152
|
+
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CONDITIONS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTENSIONS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_MAIN_FIELDS, DEFAULT_PREVIEW_PORT, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ERR_OUTDATED_OPTIMIZED_DEP, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, loopbackHosts, wildcardHosts };
|