vite 2.9.0 → 2.9.1

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.

@@ -26732,7 +26732,7 @@ const assetAttrsConfig = {
26732
26732
  const isAsyncScriptMap = new WeakMap();
26733
26733
  async function traverseHtml(html, filePath, visitor) {
26734
26734
  // lazy load compiler
26735
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-277ed9f7.js'); }).then(function (n) { return n.compilerDom_cjs; });
26735
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-86378e0d.js'); }).then(function (n) { return n.compilerDom_cjs; });
26736
26736
  // @vue/compiler-core doesn't like lowercase doctypes
26737
26737
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
26738
26738
  try {
@@ -27819,7 +27819,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
27819
27819
  replacer: urlReplacer
27820
27820
  }));
27821
27821
  if (isModule) {
27822
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-e67ca846.js'); }).then(function (n) { return n.index; })).default({
27822
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-ab7432fd.js'); }).then(function (n) { return n.index; })).default({
27823
27823
  ...modulesOptions,
27824
27824
  getJSON(cssFileName, _modules, outputFileName) {
27825
27825
  modules = _modules;
@@ -37132,7 +37132,6 @@ async function runOptimizeDeps(config, depsInfo) {
37132
37132
  commit() {
37133
37133
  // Write metadata file, delete `deps` folder and rename the `processing` folder to `deps`
37134
37134
  commitProcessingDepsCacheSync();
37135
- config.logger.info(`No dependencies to bundle. Skipping.\n\n\n`);
37136
37135
  },
37137
37136
  cancel
37138
37137
  };
@@ -46982,7 +46981,7 @@ async function getCertificate(cacheDir) {
46982
46981
  return content;
46983
46982
  }
46984
46983
  catch {
46985
- const content = (await Promise.resolve().then(function () { return require('./dep-57123445.js'); })).createCertificate();
46984
+ const content = (await Promise.resolve().then(function () { return require('./dep-958b75cb.js'); })).createCertificate();
46986
46985
  fs$n.promises
46987
46986
  .mkdir(cacheDir, { recursive: true })
46988
46987
  .then(() => fs$n.promises.writeFile(cachePath, content))
@@ -59065,12 +59064,13 @@ async function createServer(inlineConfig = {}) {
59065
59064
  return server;
59066
59065
  }
59067
59066
  async function startServer(server, inlinePort, isRestart = false) {
59067
+ var _a;
59068
59068
  const httpServer = server.httpServer;
59069
59069
  if (!httpServer) {
59070
59070
  throw new Error('Cannot call server.listen in middleware mode.');
59071
59071
  }
59072
59072
  const options = server.config.server;
59073
- const port = inlinePort || options.port || 3000;
59073
+ const port = (_a = inlinePort !== null && inlinePort !== void 0 ? inlinePort : options.port) !== null && _a !== void 0 ? _a : 3000;
59074
59074
  const hostname = resolveHostname(options.host);
59075
59075
  const protocol = options.https ? 'https' : 'http';
59076
59076
  const info = server.config.logger.info;
@@ -59226,7 +59226,7 @@ const noop = () => { };
59226
59226
  const mimes = /text|javascript|\/json|xml/i;
59227
59227
  const threshold = 1024;
59228
59228
  const level = -1;
59229
- const brotli = false;
59229
+ let brotli = false;
59230
59230
  const getChunkSize = (chunk, enc) => (chunk ? Buffer.byteLength(chunk, enc) : 0);
59231
59231
  function compression() {
59232
59232
  const brotliOpts = (typeof brotli === 'object' && brotli) || {};
@@ -59876,7 +59876,9 @@ function importAnalysisPlugin(config) {
59876
59876
  }
59877
59877
  else if (!importer.startsWith(clientDir) && !ssr) {
59878
59878
  // check @vite-ignore which suppresses dynamic import warning
59879
- const hasViteIgnore = /\/\*\s*@vite-ignore\s*\*\//.test(rawUrl);
59879
+ const hasViteIgnore = /\/\*\s*@vite-ignore\s*\*\//.test(
59880
+ // complete expression inside parens
59881
+ source.slice(dynamicIndex + 1, end));
59880
59882
  const url = rawUrl
59881
59883
  .replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, '')
59882
59884
  .trim();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./dep-8db0e223.js');
3
+ var index = require('./dep-611778e0.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./dep-8db0e223.js');
3
+ var index = require('./dep-611778e0.js');
4
4
  var require$$1 = require('crypto');
5
5
  require('fs');
6
6
  require('path');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('postcss');
4
- var index$1 = require('./dep-8db0e223.js');
4
+ var index$1 = require('./dep-611778e0.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-8db0e223.js');
4
+ var index = require('./chunks/dep-611778e0.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-8db0e223.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-611778e0.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-8db0e223.js'); }).then(function (n) { return n.build$1; });
735
+ const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-611778e0.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-8db0e223.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-611778e0.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-8db0e223.js'); }).then(function (n) { return n.preview$1; });
781
+ const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-611778e0.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-8db0e223.js');
5
+ var index = require('./chunks/dep-611778e0.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.0",
3
+ "version": "2.9.1",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",