vite 2.9.2 → 2.9.3

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
  'use strict';
2
2
 
3
- var index = require('./dep-e7afa13e.js');
3
+ var index = require('./dep-e1560bbd.js');
4
4
  var require$$1 = require('crypto');
5
5
  require('fs');
6
6
  require('path');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./dep-e7afa13e.js');
3
+ var index = require('./dep-e1560bbd.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
@@ -26851,7 +26851,7 @@ const assetAttrsConfig = {
26851
26851
  const isAsyncScriptMap = new WeakMap();
26852
26852
  async function traverseHtml(html, filePath, visitor) {
26853
26853
  // lazy load compiler
26854
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-1df7b07f.js'); }).then(function (n) { return n.compilerDom_cjs; });
26854
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-7f1d9c29.js'); }).then(function (n) { return n.compilerDom_cjs; });
26855
26855
  // @vue/compiler-core doesn't like lowercase doctypes
26856
26856
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
26857
26857
  try {
@@ -27951,7 +27951,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
27951
27951
  replacer: urlReplacer
27952
27952
  }));
27953
27953
  if (isModule) {
27954
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-559163d5.js'); }).then(function (n) { return n.index; })).default({
27954
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-fbe4d8d9.js'); }).then(function (n) { return n.index; })).default({
27955
27955
  ...modulesOptions,
27956
27956
  getJSON(cssFileName, _modules, outputFileName) {
27957
27957
  modules = _modules;
@@ -47142,7 +47142,7 @@ async function getCertificate(cacheDir) {
47142
47142
  return content;
47143
47143
  }
47144
47144
  catch {
47145
- const content = (await Promise.resolve().then(function () { return require('./dep-aae62ed4.js'); })).createCertificate();
47145
+ const content = (await Promise.resolve().then(function () { return require('./dep-0620f5de.js'); })).createCertificate();
47146
47146
  fs$n.promises
47147
47147
  .mkdir(cacheDir, { recursive: true })
47148
47148
  .then(() => fs$n.promises.writeFile(cachePath, content))
@@ -59539,18 +59539,9 @@ async function preview(inlineConfig) {
59539
59539
  const distDir = path__default.resolve(config.root, config.build.outDir);
59540
59540
  app.use(config.base, sirv(distDir, {
59541
59541
  etag: true,
59542
- dev: true
59542
+ dev: true,
59543
+ single: true
59543
59544
  }));
59544
- app.use(config.base, (_, res, next) => {
59545
- const file = path__default.join(distDir, './404.html');
59546
- if (fs__default.existsSync(file)) {
59547
- res.statusCode = 404;
59548
- res.end(fs__default.readFileSync(file));
59549
- }
59550
- else {
59551
- next();
59552
- }
59553
- });
59554
59545
  const options = config.preview;
59555
59546
  const hostname = resolveHostname(options.host);
59556
59547
  const port = (_b = options.port) !== null && _b !== void 0 ? _b : 4173;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('postcss');
4
- var index$1 = require('./dep-e7afa13e.js');
4
+ var index$1 = require('./dep-e1560bbd.js');
5
5
  var path$2 = require('path');
6
6
  var require$$1 = require('crypto');
7
7
  var fs = require('fs');
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-e7afa13e.js');
4
+ var index = require('./chunks/dep-e1560bbd.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-e7afa13e.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-e1560bbd.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-e7afa13e.js'); }).then(function (n) { return n.build$1; });
735
+ const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-e1560bbd.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-e7afa13e.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-e1560bbd.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-e7afa13e.js'); }).then(function (n) { return n.preview$1; });
781
+ const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-e1560bbd.js'); }).then(function (n) { return n.preview$1; });
782
782
  try {
783
783
  const server = await preview({
784
784
  root,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./chunks/dep-e7afa13e.js');
5
+ var index = require('./chunks/dep-e1560bbd.js');
6
6
  require('fs');
7
7
  require('path');
8
8
  require('tty');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",