vite 2.9.0-beta.1 → 2.9.0-beta.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/node/chunks/{dep-1cf708c4.js → dep-183d31dd.js} +1 -1
- package/dist/node/chunks/{dep-62435a6f.js → dep-6ae84d6b.js} +22 -4
- package/dist/node/chunks/{dep-28bf75e1.js → dep-c4c66661.js} +1 -1
- package/dist/node/chunks/{dep-47674adb.js → dep-ce77a218.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +1 -1
- package/package.json +1 -1
|
@@ -18935,7 +18935,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
18935
18935
|
replacer: urlReplacer
|
|
18936
18936
|
}));
|
|
18937
18937
|
if (isModule) {
|
|
18938
|
-
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-
|
|
18938
|
+
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-ce77a218.js'); }).then(function (n) { return n.index; })).default({
|
|
18939
18939
|
...modulesOptions,
|
|
18940
18940
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
18941
18941
|
modules = _modules;
|
|
@@ -21393,7 +21393,7 @@ const assetAttrsConfig = {
|
|
|
21393
21393
|
const isAsyncScriptMap = new WeakMap();
|
|
21394
21394
|
async function traverseHtml(html, filePath, visitor) {
|
|
21395
21395
|
// lazy load compiler
|
|
21396
|
-
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-
|
|
21396
|
+
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-c4c66661.js'); }).then(function (n) { return n.compilerDom_cjs; });
|
|
21397
21397
|
// @vue/compiler-core doesn't like lowercase doctypes
|
|
21398
21398
|
html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
|
|
21399
21399
|
try {
|
|
@@ -36967,12 +36967,24 @@ function getRealPath(resolved, preserveSymlinks) {
|
|
|
36967
36967
|
}
|
|
36968
36968
|
|
|
36969
36969
|
const debug$a = createDebugger('vite:ssr-external');
|
|
36970
|
+
/**
|
|
36971
|
+
* Converts "parent > child" syntax to just "child"
|
|
36972
|
+
*/
|
|
36973
|
+
function stripNesting(packages) {
|
|
36974
|
+
return packages.map((s) => {
|
|
36975
|
+
const arr = s.split('>');
|
|
36976
|
+
return arr[arr.length - 1].trim();
|
|
36977
|
+
});
|
|
36978
|
+
}
|
|
36970
36979
|
/**
|
|
36971
36980
|
* Heuristics for determining whether a dependency should be externalized for
|
|
36972
36981
|
* server-side rendering.
|
|
36973
36982
|
*/
|
|
36974
36983
|
function resolveSSRExternal(config, knownImports) {
|
|
36975
36984
|
var _a;
|
|
36985
|
+
// strip nesting since knownImports may be passed in from optimizeDeps which
|
|
36986
|
+
// supports a "parent > child" syntax
|
|
36987
|
+
knownImports = stripNesting(knownImports);
|
|
36976
36988
|
const ssrConfig = config.ssr;
|
|
36977
36989
|
if ((ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.noExternal) === true) {
|
|
36978
36990
|
return [];
|
|
@@ -43463,7 +43475,7 @@ async function getCertificate(cacheDir) {
|
|
|
43463
43475
|
return content;
|
|
43464
43476
|
}
|
|
43465
43477
|
catch {
|
|
43466
|
-
const content = (await Promise.resolve().then(function () { return require('./dep-
|
|
43478
|
+
const content = (await Promise.resolve().then(function () { return require('./dep-183d31dd.js'); })).createCertificate();
|
|
43467
43479
|
fs$n.promises
|
|
43468
43480
|
.mkdir(cacheDir, { recursive: true })
|
|
43469
43481
|
.then(() => fs$n.promises.writeFile(cachePath, content))
|
|
@@ -55378,6 +55390,7 @@ const clientDir = normalizePath$4(CLIENT_DIR);
|
|
|
55378
55390
|
const skipRE = /\.(map|json)$/;
|
|
55379
55391
|
const canSkip = (id) => skipRE.test(id) || isDirectCSSRequest(id);
|
|
55380
55392
|
const optimizedDepChunkRE = /\/chunk-[A-Z0-9]{8}\.js/;
|
|
55393
|
+
const optimizedDepDynamicRE = /-[A-Z0-9]{8}\.js/;
|
|
55381
55394
|
function isExplicitImportRequired(url) {
|
|
55382
55395
|
return !isJSRequest(cleanUrl(url)) && !isCSSRequest(url);
|
|
55383
55396
|
}
|
|
@@ -55666,7 +55679,12 @@ function importAnalysisPlugin(config) {
|
|
|
55666
55679
|
const file = cleanUrl(resolvedId); // Remove ?v={hash}
|
|
55667
55680
|
const needsInterop = await optimizedDepNeedsInterop(server._optimizeDepsMetadata, file);
|
|
55668
55681
|
if (needsInterop === undefined) {
|
|
55669
|
-
|
|
55682
|
+
// Non-entry dynamic imports from dependencies will reach here as there isn't
|
|
55683
|
+
// optimize info for them, but they don't need es interop. If the request isn't
|
|
55684
|
+
// a dynamic import, then it is an internal Vite error
|
|
55685
|
+
if (!file.match(optimizedDepDynamicRE)) {
|
|
55686
|
+
config.logger.error(colors$1.red(`Vite Error, ${url} optimized info should be defined`));
|
|
55687
|
+
}
|
|
55670
55688
|
}
|
|
55671
55689
|
else if (needsInterop) {
|
|
55672
55690
|
debug$1(`${url} needs interop`);
|
package/dist/node/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$0 = require('events');
|
|
4
|
-
var index = require('./chunks/dep-
|
|
4
|
+
var index = require('./chunks/dep-6ae84d6b.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -683,7 +683,7 @@ cli
|
|
|
683
683
|
.action(async (root, options) => {
|
|
684
684
|
// output structure is preserved even after bundling so require()
|
|
685
685
|
// is ok here
|
|
686
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
686
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-6ae84d6b.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -732,7 +732,7 @@ cli
|
|
|
732
732
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
733
733
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
734
734
|
.action(async (root, options) => {
|
|
735
|
-
const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-6ae84d6b.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]', 'pre-bundle dependencies')
|
|
756
756
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
757
757
|
.action(async (root, options) => {
|
|
758
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
758
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-6ae84d6b.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await index.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -778,7 +778,7 @@ cli
|
|
|
778
778
|
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
779
779
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
780
780
|
.action(async (root, options) => {
|
|
781
|
-
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
781
|
+
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-6ae84d6b.js'); }).then(function (n) { return n.preview$1; });
|
|
782
782
|
try {
|
|
783
783
|
const server = await preview({
|
|
784
784
|
root,
|
package/dist/node/index.js
CHANGED