vite 2.7.0-beta.10 → 2.7.0-beta.11

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.

@@ -20396,7 +20396,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
20396
20396
  replacer: urlReplacer
20397
20397
  }));
20398
20398
  if (isModule) {
20399
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-a3c19f8f.js'); }).then(function (n) { return n.index; })).default({
20399
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-156d979b.js'); }).then(function (n) { return n.index; })).default({
20400
20400
  ...modulesOptions,
20401
20401
  getJSON(cssFileName, _modules, outputFileName) {
20402
20402
  modules = _modules;
@@ -21374,7 +21374,7 @@ const assetAttrsConfig = {
21374
21374
  const isAsyncScriptMap = new WeakMap();
21375
21375
  async function traverseHtml(html, filePath, visitor) {
21376
21376
  // lazy load compiler
21377
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-90b4005b.js'); }).then(function (n) { return n.compilerDom_cjs; });
21377
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-e176e7bc.js'); }).then(function (n) { return n.compilerDom_cjs; });
21378
21378
  // @vue/compiler-core doesn't like lowercase doctypes
21379
21379
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
21380
21380
  try {
@@ -49533,7 +49533,7 @@ function readFileIfExists(value) {
49533
49533
  * https://github.com/webpack/webpack-dev-server/blob/master/LICENSE
49534
49534
  */
49535
49535
  async function createCertificate() {
49536
- const { generate } = await Promise.resolve().then(function () { return require('./dep-a1eaeb97.js'); }).then(function (n) { return n.index; });
49536
+ const { generate } = await Promise.resolve().then(function () { return require('./dep-c011d901.js'); }).then(function (n) { return n.index; });
49537
49537
  const pems = generate(null, {
49538
49538
  algorithm: 'sha256',
49539
49539
  days: 30,
@@ -67390,7 +67390,16 @@ async function nodeImport(id, importer, resolveOptions) {
67390
67390
  }
67391
67391
  // rollup-style default import interop for cjs
67392
67392
  function proxyESM(mod) {
67393
- const defaultExport = getDefaultExport(mod);
67393
+ // This is the only sensible option when the exports object is a primitve
67394
+ if (isPrimitive(mod))
67395
+ return { default: mod };
67396
+ let defaultExport = 'default' in mod ? mod.default : mod;
67397
+ if (!isPrimitive(defaultExport) && '__esModule' in defaultExport) {
67398
+ mod = defaultExport;
67399
+ if ('default' in defaultExport) {
67400
+ defaultExport = defaultExport.default;
67401
+ }
67402
+ }
67394
67403
  return new Proxy(mod, {
67395
67404
  get(mod, prop) {
67396
67405
  var _a;
@@ -67400,32 +67409,8 @@ function proxyESM(mod) {
67400
67409
  }
67401
67410
  });
67402
67411
  }
67403
- function getDefaultExport(moduleExports) {
67404
- // `moduleExports` is one of the following:
67405
- // - `const moduleExports = require(file)`
67406
- // - `const moduleExports = await import(file)`
67407
- let defaultExport = 'default' in moduleExports ? moduleExports.default : moduleExports;
67408
- // Node.js doesn't support `__esModule`, see https://github.com/nodejs/node/issues/40891
67409
- // This means we need to unwrap the `__esModule` wrapper ourselves.
67410
- //
67411
- // For example:
67412
- // ```ts
67413
- // export default 'hi'
67414
- // ```
67415
- //
67416
- // Which TypeScript transpiles to:
67417
- // ```js
67418
- // use strict";
67419
- // exports.__esModule = true;
67420
- // exports["default"] = 'hi';
67421
- // ```
67422
- //
67423
- // This means that `moduleExports.default` denotes `{ __esModule, default: 'hi }` thus the actual
67424
- // default lives in `moduleExports.default.default`.
67425
- if (defaultExport && '__esModule' in defaultExport) {
67426
- defaultExport = defaultExport.default;
67427
- }
67428
- return defaultExport;
67412
+ function isPrimitive(value) {
67413
+ return !value || (typeof value !== 'object' && typeof value !== 'function');
67429
67414
  }
67430
67415
 
67431
67416
  /**
@@ -82471,4 +82456,4 @@ exports.send = send$1;
82471
82456
  exports.sortUserPlugins = sortUserPlugins;
82472
82457
  exports.source = source;
82473
82458
  exports.transformWithEsbuild = transformWithEsbuild;
82474
- //# sourceMappingURL=dep-e6ce7715.js.map
82459
+ //# sourceMappingURL=dep-ce1019e0.js.map