vite 4.0.0-beta.6 → 4.0.0
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 { C as commonjsGlobal } from './dep-
|
|
3
|
+
import { C as commonjsGlobal } from './dep-ed9cb113.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
|
@@ -22844,7 +22844,6 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
|
|
|
22844
22844
|
if (data.exports) {
|
|
22845
22845
|
entryPoint = resolveExports(data, '.', options, targetWeb);
|
|
22846
22846
|
}
|
|
22847
|
-
const resolvedFromExports = !!entryPoint;
|
|
22848
22847
|
// if exports resolved to .mjs, still resolve other fields.
|
|
22849
22848
|
// This is because .mjs files can technically import .cjs files which would
|
|
22850
22849
|
// make them invalid for pure ESM environments - so if other module/browser
|
|
@@ -22887,9 +22886,7 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
|
|
|
22887
22886
|
}
|
|
22888
22887
|
}
|
|
22889
22888
|
}
|
|
22890
|
-
|
|
22891
|
-
// TODO: review if `.mjs` check is still needed
|
|
22892
|
-
if (!resolvedFromExports && (!entryPoint || entryPoint.endsWith('.mjs'))) {
|
|
22889
|
+
if (!entryPoint || entryPoint.endsWith('.mjs')) {
|
|
22893
22890
|
for (const field of options.mainFields) {
|
|
22894
22891
|
if (field === 'browser')
|
|
22895
22892
|
continue; // already checked above
|
|
@@ -36191,6 +36188,7 @@ function stripLiteral(code) {
|
|
|
36191
36188
|
}
|
|
36192
36189
|
|
|
36193
36190
|
const modulePreloadPolyfillId = 'vite/modulepreload-polyfill';
|
|
36191
|
+
const resolvedModulePreloadPolyfillId = '\0' + modulePreloadPolyfillId;
|
|
36194
36192
|
function modulePreloadPolyfillPlugin(config) {
|
|
36195
36193
|
// `isModernFlag` is only available during build since it is resolved by `vite:build-import-analysis`
|
|
36196
36194
|
const skip = config.command !== 'build' || config.build.ssr;
|
|
@@ -36199,11 +36197,11 @@ function modulePreloadPolyfillPlugin(config) {
|
|
|
36199
36197
|
name: 'vite:modulepreload-polyfill',
|
|
36200
36198
|
resolveId(id) {
|
|
36201
36199
|
if (id === modulePreloadPolyfillId) {
|
|
36202
|
-
return
|
|
36200
|
+
return resolvedModulePreloadPolyfillId;
|
|
36203
36201
|
}
|
|
36204
36202
|
},
|
|
36205
36203
|
load(id) {
|
|
36206
|
-
if (id ===
|
|
36204
|
+
if (id === resolvedModulePreloadPolyfillId) {
|
|
36207
36205
|
if (skip) {
|
|
36208
36206
|
return '';
|
|
36209
36207
|
}
|
|
@@ -37611,7 +37609,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
37611
37609
|
}));
|
|
37612
37610
|
}
|
|
37613
37611
|
if (isModule) {
|
|
37614
|
-
postcssPlugins.unshift((await import('./dep-
|
|
37612
|
+
postcssPlugins.unshift((await import('./dep-8f344fbd.js').then(function (n) { return n.i; })).default({
|
|
37615
37613
|
...modulesOptions,
|
|
37616
37614
|
localsConvention: modulesOptions?.localsConvention,
|
|
37617
37615
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -41104,7 +41102,7 @@ function serializeDefine(define) {
|
|
|
41104
41102
|
return res + `}`;
|
|
41105
41103
|
}
|
|
41106
41104
|
|
|
41107
|
-
const wasmHelperId = '/
|
|
41105
|
+
const wasmHelperId = '\0vite/wasm-helper';
|
|
41108
41106
|
const wasmHelper = async (opts = {}, url) => {
|
|
41109
41107
|
let result;
|
|
41110
41108
|
if (url.startsWith('data:')) {
|
|
@@ -41781,7 +41779,7 @@ function dynamicImportToGlob(node, sourceString) {
|
|
|
41781
41779
|
return glob;
|
|
41782
41780
|
}
|
|
41783
41781
|
|
|
41784
|
-
const dynamicImportHelperId = '
|
|
41782
|
+
const dynamicImportHelperId = '\0vite/dynamic-import-helper';
|
|
41785
41783
|
const dynamicImportHelper = (glob, path) => {
|
|
41786
41784
|
const v = glob[path];
|
|
41787
41785
|
if (v) {
|
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 { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-ed9cb113.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:module';
|
|
@@ -725,7 +725,7 @@ cli
|
|
|
725
725
|
filterDuplicateOptions(options);
|
|
726
726
|
// output structure is preserved even after bundling so require()
|
|
727
727
|
// is ok here
|
|
728
|
-
const { createServer } = await import('./chunks/dep-
|
|
728
|
+
const { createServer } = await import('./chunks/dep-ed9cb113.js').then(function (n) { return n.F; });
|
|
729
729
|
try {
|
|
730
730
|
const server = await createServer({
|
|
731
731
|
root,
|
|
@@ -804,7 +804,7 @@ cli
|
|
|
804
804
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
805
805
|
.action(async (root, options) => {
|
|
806
806
|
filterDuplicateOptions(options);
|
|
807
|
-
const { build } = await import('./chunks/dep-
|
|
807
|
+
const { build } = await import('./chunks/dep-ed9cb113.js').then(function (n) { return n.E; });
|
|
808
808
|
const buildOptions = cleanOptions(options);
|
|
809
809
|
try {
|
|
810
810
|
await build({
|
|
@@ -832,7 +832,7 @@ cli
|
|
|
832
832
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
833
833
|
.action(async (root, options) => {
|
|
834
834
|
filterDuplicateOptions(options);
|
|
835
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
835
|
+
const { optimizeDeps } = await import('./chunks/dep-ed9cb113.js').then(function (n) { return n.D; });
|
|
836
836
|
try {
|
|
837
837
|
const config = await resolveConfig({
|
|
838
838
|
root,
|
|
@@ -857,7 +857,7 @@ cli
|
|
|
857
857
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
858
858
|
.action(async (root, options) => {
|
|
859
859
|
filterDuplicateOptions(options);
|
|
860
|
-
const { preview } = await import('./chunks/dep-
|
|
860
|
+
const { preview } = await import('./chunks/dep-ed9cb113.js').then(function (n) { return n.G; });
|
|
861
861
|
try {
|
|
862
862
|
const server = await preview({
|
|
863
863
|
root,
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-ed9cb113.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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"esbuild": "^0.16.
|
|
61
|
+
"esbuild": "^0.16.3",
|
|
62
62
|
"postcss": "^8.4.19",
|
|
63
63
|
"resolve": "^1.22.1",
|
|
64
64
|
"rollup": "^3.7.0"
|