vite 4.0.0-beta.6 → 4.0.0-beta.7
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.
|
@@ -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
|
|
@@ -37611,7 +37608,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
37611
37608
|
}));
|
|
37612
37609
|
}
|
|
37613
37610
|
if (isModule) {
|
|
37614
|
-
postcssPlugins.unshift((await import('./dep-
|
|
37611
|
+
postcssPlugins.unshift((await import('./dep-ad878046.js').then(function (n) { return n.i; })).default({
|
|
37615
37612
|
...modulesOptions,
|
|
37616
37613
|
localsConvention: modulesOptions?.localsConvention,
|
|
37617
37614
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -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-9ef48a42.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
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-9ef48a42.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-9ef48a42.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-9ef48a42.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-9ef48a42.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-9ef48a42.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-9ef48a42.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';
|