vite 2.8.2 → 2.8.5
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/LICENSE.md +0 -1
- package/dist/client/client.mjs +1 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-50851e02.js → dep-1a638407.js} +1 -1
- package/dist/node/chunks/{dep-15d13ae7.js → dep-7e724347.js} +5 -5
- package/dist/node/chunks/{dep-333341a0.js → dep-b09e7447.js} +1 -1
- package/dist/node/chunks/{dep-3d5f2596.js → dep-ff3ab196.js} +146 -130
- package/dist/node/cli.js +9 -9
- package/dist/node/index.d.ts +6 -4
- package/dist/node/index.js +1 -1
- package/package.json +2 -2
- package/src/client/client.ts +2 -2
package/LICENSE.md
CHANGED
|
@@ -1241,7 +1241,6 @@ Repository: git://github.com/motdotla/dotenv.git
|
|
|
1241
1241
|
## dotenv-expand
|
|
1242
1242
|
License: BSD-2-Clause
|
|
1243
1243
|
By: motdotla
|
|
1244
|
-
Repository: https://github.com/motdotla/dotenv-expand
|
|
1245
1244
|
|
|
1246
1245
|
> Copyright (c) 2016, Scott Motte
|
|
1247
1246
|
> All rights reserved.
|
package/dist/client/client.mjs
CHANGED
|
@@ -382,7 +382,7 @@ function removeStyle(id) {
|
|
|
382
382
|
const style = sheetsMap.get(id);
|
|
383
383
|
if (style) {
|
|
384
384
|
if (style instanceof CSSStyleSheet) {
|
|
385
|
-
// @ts-
|
|
385
|
+
// @ts-expect-error: using experimental API
|
|
386
386
|
document.adoptedStyleSheets = document.adoptedStyleSheets.filter((s) => s !== style);
|
|
387
387
|
}
|
|
388
388
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.mjs","sources":["../../src/client/overlay.ts","../../src/client/client.ts"],"sourcesContent":["import type { ErrorPayload } from 'types/hmrPayload'\n\nconst template = /*html*/ `\n<style>\n:host {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n margin: 0;\n background: rgba(0, 0, 0, 0.66);\n --monospace: 'SFMono-Regular', Consolas,\n 'Liberation Mono', Menlo, Courier, monospace;\n --red: #ff5555;\n --yellow: #e2aa53;\n --purple: #cfa4ff;\n --cyan: #2dd9da;\n --dim: #c9c9c9;\n}\n\n.window {\n font-family: var(--monospace);\n line-height: 1.5;\n width: 800px;\n color: #d8d8d8;\n margin: 30px auto;\n padding: 25px 40px;\n position: relative;\n background: #181818;\n border-radius: 6px 6px 8px 8px;\n box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\n overflow: hidden;\n border-top: 8px solid var(--red);\n direction: ltr;\n text-align: left;\n}\n\npre {\n font-family: var(--monospace);\n font-size: 16px;\n margin-top: 0;\n margin-bottom: 1em;\n overflow-x: scroll;\n scrollbar-width: none;\n}\n\npre::-webkit-scrollbar {\n display: none;\n}\n\n.message {\n line-height: 1.3;\n font-weight: 600;\n white-space: pre-wrap;\n}\n\n.message-body {\n color: var(--red);\n}\n\n.plugin {\n color: var(--purple);\n}\n\n.file {\n color: var(--cyan);\n margin-bottom: 0;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.frame {\n color: var(--yellow);\n}\n\n.stack {\n font-size: 13px;\n color: var(--dim);\n}\n\n.tip {\n font-size: 13px;\n color: #999;\n border-top: 1px dotted #999;\n padding-top: 13px;\n}\n\ncode {\n font-size: 13px;\n font-family: var(--monospace);\n color: var(--yellow);\n}\n\n.file-link {\n text-decoration: underline;\n cursor: pointer;\n}\n</style>\n<div class=\"window\">\n <pre class=\"message\"><span class=\"plugin\"></span><span class=\"message-body\"></span></pre>\n <pre class=\"file\"></pre>\n <pre class=\"frame\"></pre>\n <pre class=\"stack\"></pre>\n <div class=\"tip\">\n Click outside or fix the code to dismiss.<br>\n You can also disable this overlay by setting\n <code>server.hmr.overlay</code> to <code>false</code> in <code>vite.config.js.</code>\n </div>\n</div>\n`\n\nconst fileRE = /(?:[a-zA-Z]:\\\\|\\/).*?:\\d+:\\d+/g\nconst codeframeRE = /^(?:>?\\s+\\d+\\s+\\|.*|\\s+\\|\\s*\\^.*)\\r?\\n/gm\n\nexport class ErrorOverlay extends HTMLElement {\n root: ShadowRoot\n\n constructor(err: ErrorPayload['err']) {\n super()\n this.root = this.attachShadow({ mode: 'open' })\n this.root.innerHTML = template\n\n codeframeRE.lastIndex = 0\n const hasFrame = err.frame && codeframeRE.test(err.frame)\n const message = hasFrame\n ? err.message.replace(codeframeRE, '')\n : err.message\n if (err.plugin) {\n this.text('.plugin', `[plugin:${err.plugin}] `)\n }\n this.text('.message-body', message.trim())\n\n const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`)\n if (err.loc) {\n this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, true)\n } else if (err.id) {\n this.text('.file', file)\n }\n\n if (hasFrame) {\n this.text('.frame', err.frame!.trim())\n }\n this.text('.stack', err.stack, true)\n\n this.root.querySelector('.window')!.addEventListener('click', (e) => {\n e.stopPropagation()\n })\n this.addEventListener('click', () => {\n this.close()\n })\n }\n\n text(selector: string, text: string, linkFiles = false): void {\n const el = this.root.querySelector(selector)!\n if (!linkFiles) {\n el.textContent = text\n } else {\n let curIndex = 0\n let match: RegExpExecArray | null\n while ((match = fileRE.exec(text))) {\n const { 0: file, index } = match\n if (index != null) {\n const frag = text.slice(curIndex, index)\n el.appendChild(document.createTextNode(frag))\n const link = document.createElement('a')\n link.textContent = file\n link.className = 'file-link'\n link.onclick = () => {\n fetch('/__open-in-editor?file=' + encodeURIComponent(file))\n }\n el.appendChild(link)\n curIndex += frag.length + file.length\n }\n }\n }\n }\n\n close(): void {\n this.parentNode?.removeChild(this)\n }\n}\n\nexport const overlayId = 'vite-error-overlay'\nif (customElements && !customElements.get(overlayId)) {\n customElements.define(overlayId, ErrorOverlay)\n}\n","import type {\n ErrorPayload,\n FullReloadPayload,\n HMRPayload,\n PrunePayload,\n Update,\n UpdatePayload\n} from 'types/hmrPayload'\nimport type { CustomEventName } from 'types/customEvent'\nimport { ErrorOverlay, overlayId } from './overlay'\n// eslint-disable-next-line node/no-missing-import\nimport '@vite/env'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __HMR_PROTOCOL__: string\ndeclare const __HMR_HOSTNAME__: string\ndeclare const __HMR_PORT__: string\ndeclare const __HMR_TIMEOUT__: number\ndeclare const __HMR_ENABLE_OVERLAY__: boolean\n\nconsole.log('[vite] connecting...')\n\n// use server configuration, then fallback to inference\nconst socketProtocol =\n __HMR_PROTOCOL__ || (location.protocol === 'https:' ? 'wss' : 'ws')\nconst socketHost = `${__HMR_HOSTNAME__ || location.hostname}:${__HMR_PORT__}`\nconst socket = new WebSocket(`${socketProtocol}://${socketHost}`, 'vite-hmr')\nconst base = __BASE__ || '/'\n\nfunction warnFailedFetch(err: Error, path: string | string[]) {\n if (!err.message.match('fetch')) {\n console.error(err)\n }\n console.error(\n `[hmr] Failed to reload ${path}. ` +\n `This could be due to syntax errors or importing non-existent ` +\n `modules. (see errors above)`\n )\n}\n\nfunction cleanUrl(pathname: string): string {\n const url = new URL(pathname, location.toString())\n url.searchParams.delete('direct')\n return url.pathname + url.search\n}\n\n// Listen for messages\nsocket.addEventListener('message', async ({ data }) => {\n handleMessage(JSON.parse(data))\n})\n\nlet isFirstUpdate = true\n\nasync function handleMessage(payload: HMRPayload) {\n switch (payload.type) {\n case 'connected':\n console.log(`[vite] connected.`)\n // proxy(nginx, docker) hmr ws maybe caused timeout,\n // so send ping package let ws keep alive.\n setInterval(() => socket.send('ping'), __HMR_TIMEOUT__)\n break\n case 'update':\n notifyListeners('vite:beforeUpdate', payload)\n // if this is the first update and there's already an error overlay, it\n // means the page opened with existing server compile error and the whole\n // module script failed to load (since one of the nested imports is 500).\n // in this case a normal update won't work and a full reload is needed.\n if (isFirstUpdate && hasErrorOverlay()) {\n window.location.reload()\n return\n } else {\n clearErrorOverlay()\n isFirstUpdate = false\n }\n payload.updates.forEach((update) => {\n if (update.type === 'js-update') {\n queueUpdate(fetchUpdate(update))\n } else {\n // css-update\n // this is only sent when a css file referenced with <link> is updated\n const { path, timestamp } = update\n const searchUrl = cleanUrl(path)\n // can't use querySelector with `[href*=]` here since the link may be\n // using relative paths so we need to use link.href to grab the full\n // URL for the include check.\n const el = Array.from(\n document.querySelectorAll<HTMLLinkElement>('link')\n ).find((e) => cleanUrl(e.href).includes(searchUrl))\n if (el) {\n const newPath = `${base}${searchUrl.slice(1)}${\n searchUrl.includes('?') ? '&' : '?'\n }t=${timestamp}`\n el.href = new URL(newPath, el.href).href\n }\n console.log(`[vite] css hot updated: ${searchUrl}`)\n }\n })\n break\n case 'custom': {\n notifyListeners(payload.event as CustomEventName<any>, payload.data)\n break\n }\n case 'full-reload':\n notifyListeners('vite:beforeFullReload', payload)\n if (payload.path && payload.path.endsWith('.html')) {\n // if html file is edited, only reload the page if the browser is\n // currently on that page.\n const pagePath = decodeURI(location.pathname)\n const payloadPath = base + payload.path.slice(1)\n if (\n pagePath === payloadPath ||\n (pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath)\n ) {\n location.reload()\n }\n return\n } else {\n location.reload()\n }\n break\n case 'prune':\n notifyListeners('vite:beforePrune', payload)\n // After an HMR update, some modules are no longer imported on the page\n // but they may have left behind side effects that need to be cleaned up\n // (.e.g style injections)\n // TODO Trigger their dispose callbacks.\n payload.paths.forEach((path) => {\n const fn = pruneMap.get(path)\n if (fn) {\n fn(dataMap.get(path))\n }\n })\n break\n case 'error': {\n notifyListeners('vite:error', payload)\n const err = payload.err\n if (enableOverlay) {\n createErrorOverlay(err)\n } else {\n console.error(\n `[vite] Internal Server Error\\n${err.message}\\n${err.stack}`\n )\n }\n break\n }\n default: {\n const check: never = payload\n return check\n }\n }\n}\n\nfunction notifyListeners(\n event: 'vite:beforeUpdate',\n payload: UpdatePayload\n): void\nfunction notifyListeners(event: 'vite:beforePrune', payload: PrunePayload): void\nfunction notifyListeners(\n event: 'vite:beforeFullReload',\n payload: FullReloadPayload\n): void\nfunction notifyListeners(event: 'vite:error', payload: ErrorPayload): void\nfunction notifyListeners<T extends string>(\n event: CustomEventName<T>,\n data: any\n): void\nfunction notifyListeners(event: string, data: any): void {\n const cbs = customListenersMap.get(event)\n if (cbs) {\n cbs.forEach((cb) => cb(data))\n }\n}\n\nconst enableOverlay = __HMR_ENABLE_OVERLAY__\n\nfunction createErrorOverlay(err: ErrorPayload['err']) {\n if (!enableOverlay) return\n clearErrorOverlay()\n document.body.appendChild(new ErrorOverlay(err))\n}\n\nfunction clearErrorOverlay() {\n document\n .querySelectorAll(overlayId)\n .forEach((n) => (n as ErrorOverlay).close())\n}\n\nfunction hasErrorOverlay() {\n return document.querySelectorAll(overlayId).length\n}\n\nlet pending = false\nlet queued: Promise<(() => void) | undefined>[] = []\n\n/**\n * buffer multiple hot updates triggered by the same src change\n * so that they are invoked in the same order they were sent.\n * (otherwise the order may be inconsistent because of the http request round trip)\n */\nasync function queueUpdate(p: Promise<(() => void) | undefined>) {\n queued.push(p)\n if (!pending) {\n pending = true\n await Promise.resolve()\n pending = false\n const loading = [...queued]\n queued = []\n ;(await Promise.all(loading)).forEach((fn) => fn && fn())\n }\n}\n\nasync function waitForSuccessfulPing(ms = 1000) {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n try {\n await fetch(`${base}__vite_ping`)\n break\n } catch (e) {\n await new Promise((resolve) => setTimeout(resolve, ms))\n }\n }\n}\n\n// ping server\nsocket.addEventListener('close', async ({ wasClean }) => {\n if (wasClean) return\n console.log(`[vite] server connection lost. polling for restart...`)\n await waitForSuccessfulPing()\n location.reload()\n})\n\n// https://wicg.github.io/construct-stylesheets\nconst supportsConstructedSheet = (() => {\n // TODO: re-enable this try block once Chrome fixes the performance of\n // rule insertion in really big stylesheets\n // try {\n // new CSSStyleSheet()\n // return true\n // } catch (e) {}\n return false\n})()\n\nconst sheetsMap = new Map()\n\nexport function updateStyle(id: string, content: string): void {\n let style = sheetsMap.get(id)\n if (supportsConstructedSheet && !content.includes('@import')) {\n if (style && !(style instanceof CSSStyleSheet)) {\n removeStyle(id)\n style = undefined\n }\n\n if (!style) {\n style = new CSSStyleSheet()\n style.replaceSync(content)\n // @ts-ignore\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, style]\n } else {\n style.replaceSync(content)\n }\n } else {\n if (style && !(style instanceof HTMLStyleElement)) {\n removeStyle(id)\n style = undefined\n }\n\n if (!style) {\n style = document.createElement('style')\n style.setAttribute('type', 'text/css')\n style.innerHTML = content\n document.head.appendChild(style)\n } else {\n style.innerHTML = content\n }\n }\n sheetsMap.set(id, style)\n}\n\nexport function removeStyle(id: string): void {\n const style = sheetsMap.get(id)\n if (style) {\n if (style instanceof CSSStyleSheet) {\n // @ts-ignore\n document.adoptedStyleSheets = document.adoptedStyleSheets.filter(\n (s: CSSStyleSheet) => s !== style\n )\n } else {\n document.head.removeChild(style)\n }\n sheetsMap.delete(id)\n }\n}\n\nasync function fetchUpdate({ path, acceptedPath, timestamp }: Update) {\n const mod = hotModulesMap.get(path)\n if (!mod) {\n // In a code-splitting project,\n // it is common that the hot-updating module is not loaded yet.\n // https://github.com/vitejs/vite/issues/721\n return\n }\n\n const moduleMap = new Map()\n const isSelfUpdate = path === acceptedPath\n\n // make sure we only import each dep once\n const modulesToUpdate = new Set<string>()\n if (isSelfUpdate) {\n // self update - only update self\n modulesToUpdate.add(path)\n } else {\n // dep update\n for (const { deps } of mod.callbacks) {\n deps.forEach((dep) => {\n if (acceptedPath === dep) {\n modulesToUpdate.add(dep)\n }\n })\n }\n }\n\n // determine the qualified callbacks before we re-import the modules\n const qualifiedCallbacks = mod.callbacks.filter(({ deps }) => {\n return deps.some((dep) => modulesToUpdate.has(dep))\n })\n\n await Promise.all(\n Array.from(modulesToUpdate).map(async (dep) => {\n const disposer = disposeMap.get(dep)\n if (disposer) await disposer(dataMap.get(dep))\n const [path, query] = dep.split(`?`)\n try {\n const newMod = await import(\n /* @vite-ignore */\n base +\n path.slice(1) +\n `?import&t=${timestamp}${query ? `&${query}` : ''}`\n )\n moduleMap.set(dep, newMod)\n } catch (e) {\n warnFailedFetch(e, dep)\n }\n })\n )\n\n return () => {\n for (const { deps, fn } of qualifiedCallbacks) {\n fn(deps.map((dep) => moduleMap.get(dep)))\n }\n const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`\n console.log(`[vite] hot updated: ${loggedPath}`)\n }\n}\n\ninterface HotModule {\n id: string\n callbacks: HotCallback[]\n}\n\ninterface HotCallback {\n // the dependencies must be fetchable paths\n deps: string[]\n fn: (modules: object[]) => void\n}\n\nconst hotModulesMap = new Map<string, HotModule>()\nconst disposeMap = new Map<string, (data: any) => void | Promise<void>>()\nconst pruneMap = new Map<string, (data: any) => void | Promise<void>>()\nconst dataMap = new Map<string, any>()\nconst customListenersMap = new Map<string, ((data: any) => void)[]>()\nconst ctxToListenersMap = new Map<\n string,\n Map<string, ((data: any) => void)[]>\n>()\n\n// Just infer the return type for now\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const createHotContext = (ownerPath: string) => {\n if (!dataMap.has(ownerPath)) {\n dataMap.set(ownerPath, {})\n }\n\n // when a file is hot updated, a new context is created\n // clear its stale callbacks\n const mod = hotModulesMap.get(ownerPath)\n if (mod) {\n mod.callbacks = []\n }\n\n // clear stale custom event listeners\n const staleListeners = ctxToListenersMap.get(ownerPath)\n if (staleListeners) {\n for (const [event, staleFns] of staleListeners) {\n const listeners = customListenersMap.get(event)\n if (listeners) {\n customListenersMap.set(\n event,\n listeners.filter((l) => !staleFns.includes(l))\n )\n }\n }\n }\n\n const newListeners = new Map()\n ctxToListenersMap.set(ownerPath, newListeners)\n\n function acceptDeps(deps: string[], callback: HotCallback['fn'] = () => {}) {\n const mod: HotModule = hotModulesMap.get(ownerPath) || {\n id: ownerPath,\n callbacks: []\n }\n mod.callbacks.push({\n deps,\n fn: callback\n })\n hotModulesMap.set(ownerPath, mod)\n }\n\n const hot = {\n get data() {\n return dataMap.get(ownerPath)\n },\n\n accept(deps: any, callback?: any) {\n if (typeof deps === 'function' || !deps) {\n // self-accept: hot.accept(() => {})\n acceptDeps([ownerPath], ([mod]) => deps && deps(mod))\n } else if (typeof deps === 'string') {\n // explicit deps\n acceptDeps([deps], ([mod]) => callback && callback(mod))\n } else if (Array.isArray(deps)) {\n acceptDeps(deps, callback)\n } else {\n throw new Error(`invalid hot.accept() usage.`)\n }\n },\n\n acceptDeps() {\n throw new Error(\n `hot.acceptDeps() is deprecated. ` +\n `Use hot.accept() with the same signature instead.`\n )\n },\n\n dispose(cb: (data: any) => void) {\n disposeMap.set(ownerPath, cb)\n },\n\n prune(cb: (data: any) => void) {\n pruneMap.set(ownerPath, cb)\n },\n\n // TODO\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n decline() {},\n\n invalidate() {\n // TODO should tell the server to re-perform hmr propagation\n // from this module as root\n location.reload()\n },\n\n // custom events\n on: (event: string, cb: (data: any) => void) => {\n const addToMap = (map: Map<string, any[]>) => {\n const existing = map.get(event) || []\n existing.push(cb)\n map.set(event, existing)\n }\n addToMap(customListenersMap)\n addToMap(newListeners)\n }\n }\n\n return hot\n}\n\n/**\n * urls here are dynamic import() urls that couldn't be statically analyzed\n */\nexport function injectQuery(url: string, queryToInject: string): string {\n // skip urls that won't be handled by vite\n if (!url.startsWith('.') && !url.startsWith('/')) {\n return url\n }\n\n // can't use pathname from URL since it may be relative like ../\n const pathname = url.replace(/#.*$/, '').replace(/\\?.*$/, '')\n const { search, hash } = new URL(url, 'http://vitejs.dev')\n\n return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${\n hash || ''\n }`\n}\n\nexport { ErrorOverlay }\n"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA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,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QAChD,OAAO,GAAG,CAAA;KACX;;IAGD,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;IAE1D,OAAO,GAAG,QAAQ,IAAI,aAAa,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,GACvE,IAAI,IAAI,EACV,EAAE,CAAA;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"client.mjs","sources":["../../src/client/overlay.ts","../../src/client/client.ts"],"sourcesContent":["import type { ErrorPayload } from 'types/hmrPayload'\n\nconst template = /*html*/ `\n<style>\n:host {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n margin: 0;\n background: rgba(0, 0, 0, 0.66);\n --monospace: 'SFMono-Regular', Consolas,\n 'Liberation Mono', Menlo, Courier, monospace;\n --red: #ff5555;\n --yellow: #e2aa53;\n --purple: #cfa4ff;\n --cyan: #2dd9da;\n --dim: #c9c9c9;\n}\n\n.window {\n font-family: var(--monospace);\n line-height: 1.5;\n width: 800px;\n color: #d8d8d8;\n margin: 30px auto;\n padding: 25px 40px;\n position: relative;\n background: #181818;\n border-radius: 6px 6px 8px 8px;\n box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\n overflow: hidden;\n border-top: 8px solid var(--red);\n direction: ltr;\n text-align: left;\n}\n\npre {\n font-family: var(--monospace);\n font-size: 16px;\n margin-top: 0;\n margin-bottom: 1em;\n overflow-x: scroll;\n scrollbar-width: none;\n}\n\npre::-webkit-scrollbar {\n display: none;\n}\n\n.message {\n line-height: 1.3;\n font-weight: 600;\n white-space: pre-wrap;\n}\n\n.message-body {\n color: var(--red);\n}\n\n.plugin {\n color: var(--purple);\n}\n\n.file {\n color: var(--cyan);\n margin-bottom: 0;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.frame {\n color: var(--yellow);\n}\n\n.stack {\n font-size: 13px;\n color: var(--dim);\n}\n\n.tip {\n font-size: 13px;\n color: #999;\n border-top: 1px dotted #999;\n padding-top: 13px;\n}\n\ncode {\n font-size: 13px;\n font-family: var(--monospace);\n color: var(--yellow);\n}\n\n.file-link {\n text-decoration: underline;\n cursor: pointer;\n}\n</style>\n<div class=\"window\">\n <pre class=\"message\"><span class=\"plugin\"></span><span class=\"message-body\"></span></pre>\n <pre class=\"file\"></pre>\n <pre class=\"frame\"></pre>\n <pre class=\"stack\"></pre>\n <div class=\"tip\">\n Click outside or fix the code to dismiss.<br>\n You can also disable this overlay by setting\n <code>server.hmr.overlay</code> to <code>false</code> in <code>vite.config.js.</code>\n </div>\n</div>\n`\n\nconst fileRE = /(?:[a-zA-Z]:\\\\|\\/).*?:\\d+:\\d+/g\nconst codeframeRE = /^(?:>?\\s+\\d+\\s+\\|.*|\\s+\\|\\s*\\^.*)\\r?\\n/gm\n\nexport class ErrorOverlay extends HTMLElement {\n root: ShadowRoot\n\n constructor(err: ErrorPayload['err']) {\n super()\n this.root = this.attachShadow({ mode: 'open' })\n this.root.innerHTML = template\n\n codeframeRE.lastIndex = 0\n const hasFrame = err.frame && codeframeRE.test(err.frame)\n const message = hasFrame\n ? err.message.replace(codeframeRE, '')\n : err.message\n if (err.plugin) {\n this.text('.plugin', `[plugin:${err.plugin}] `)\n }\n this.text('.message-body', message.trim())\n\n const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`)\n if (err.loc) {\n this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, true)\n } else if (err.id) {\n this.text('.file', file)\n }\n\n if (hasFrame) {\n this.text('.frame', err.frame!.trim())\n }\n this.text('.stack', err.stack, true)\n\n this.root.querySelector('.window')!.addEventListener('click', (e) => {\n e.stopPropagation()\n })\n this.addEventListener('click', () => {\n this.close()\n })\n }\n\n text(selector: string, text: string, linkFiles = false): void {\n const el = this.root.querySelector(selector)!\n if (!linkFiles) {\n el.textContent = text\n } else {\n let curIndex = 0\n let match: RegExpExecArray | null\n while ((match = fileRE.exec(text))) {\n const { 0: file, index } = match\n if (index != null) {\n const frag = text.slice(curIndex, index)\n el.appendChild(document.createTextNode(frag))\n const link = document.createElement('a')\n link.textContent = file\n link.className = 'file-link'\n link.onclick = () => {\n fetch('/__open-in-editor?file=' + encodeURIComponent(file))\n }\n el.appendChild(link)\n curIndex += frag.length + file.length\n }\n }\n }\n }\n\n close(): void {\n this.parentNode?.removeChild(this)\n }\n}\n\nexport const overlayId = 'vite-error-overlay'\nif (customElements && !customElements.get(overlayId)) {\n customElements.define(overlayId, ErrorOverlay)\n}\n","import type {\n ErrorPayload,\n FullReloadPayload,\n HMRPayload,\n PrunePayload,\n Update,\n UpdatePayload\n} from 'types/hmrPayload'\nimport type { CustomEventName } from 'types/customEvent'\nimport { ErrorOverlay, overlayId } from './overlay'\n// eslint-disable-next-line node/no-missing-import\nimport '@vite/env'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __HMR_PROTOCOL__: string\ndeclare const __HMR_HOSTNAME__: string\ndeclare const __HMR_PORT__: string\ndeclare const __HMR_TIMEOUT__: number\ndeclare const __HMR_ENABLE_OVERLAY__: boolean\n\nconsole.log('[vite] connecting...')\n\n// use server configuration, then fallback to inference\nconst socketProtocol =\n __HMR_PROTOCOL__ || (location.protocol === 'https:' ? 'wss' : 'ws')\nconst socketHost = `${__HMR_HOSTNAME__ || location.hostname}:${__HMR_PORT__}`\nconst socket = new WebSocket(`${socketProtocol}://${socketHost}`, 'vite-hmr')\nconst base = __BASE__ || '/'\n\nfunction warnFailedFetch(err: Error, path: string | string[]) {\n if (!err.message.match('fetch')) {\n console.error(err)\n }\n console.error(\n `[hmr] Failed to reload ${path}. ` +\n `This could be due to syntax errors or importing non-existent ` +\n `modules. (see errors above)`\n )\n}\n\nfunction cleanUrl(pathname: string): string {\n const url = new URL(pathname, location.toString())\n url.searchParams.delete('direct')\n return url.pathname + url.search\n}\n\n// Listen for messages\nsocket.addEventListener('message', async ({ data }) => {\n handleMessage(JSON.parse(data))\n})\n\nlet isFirstUpdate = true\n\nasync function handleMessage(payload: HMRPayload) {\n switch (payload.type) {\n case 'connected':\n console.log(`[vite] connected.`)\n // proxy(nginx, docker) hmr ws maybe caused timeout,\n // so send ping package let ws keep alive.\n setInterval(() => socket.send('ping'), __HMR_TIMEOUT__)\n break\n case 'update':\n notifyListeners('vite:beforeUpdate', payload)\n // if this is the first update and there's already an error overlay, it\n // means the page opened with existing server compile error and the whole\n // module script failed to load (since one of the nested imports is 500).\n // in this case a normal update won't work and a full reload is needed.\n if (isFirstUpdate && hasErrorOverlay()) {\n window.location.reload()\n return\n } else {\n clearErrorOverlay()\n isFirstUpdate = false\n }\n payload.updates.forEach((update) => {\n if (update.type === 'js-update') {\n queueUpdate(fetchUpdate(update))\n } else {\n // css-update\n // this is only sent when a css file referenced with <link> is updated\n const { path, timestamp } = update\n const searchUrl = cleanUrl(path)\n // can't use querySelector with `[href*=]` here since the link may be\n // using relative paths so we need to use link.href to grab the full\n // URL for the include check.\n const el = Array.from(\n document.querySelectorAll<HTMLLinkElement>('link')\n ).find((e) => cleanUrl(e.href).includes(searchUrl))\n if (el) {\n const newPath = `${base}${searchUrl.slice(1)}${\n searchUrl.includes('?') ? '&' : '?'\n }t=${timestamp}`\n el.href = new URL(newPath, el.href).href\n }\n console.log(`[vite] css hot updated: ${searchUrl}`)\n }\n })\n break\n case 'custom': {\n notifyListeners(payload.event as CustomEventName<any>, payload.data)\n break\n }\n case 'full-reload':\n notifyListeners('vite:beforeFullReload', payload)\n if (payload.path && payload.path.endsWith('.html')) {\n // if html file is edited, only reload the page if the browser is\n // currently on that page.\n const pagePath = decodeURI(location.pathname)\n const payloadPath = base + payload.path.slice(1)\n if (\n pagePath === payloadPath ||\n (pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath)\n ) {\n location.reload()\n }\n return\n } else {\n location.reload()\n }\n break\n case 'prune':\n notifyListeners('vite:beforePrune', payload)\n // After an HMR update, some modules are no longer imported on the page\n // but they may have left behind side effects that need to be cleaned up\n // (.e.g style injections)\n // TODO Trigger their dispose callbacks.\n payload.paths.forEach((path) => {\n const fn = pruneMap.get(path)\n if (fn) {\n fn(dataMap.get(path))\n }\n })\n break\n case 'error': {\n notifyListeners('vite:error', payload)\n const err = payload.err\n if (enableOverlay) {\n createErrorOverlay(err)\n } else {\n console.error(\n `[vite] Internal Server Error\\n${err.message}\\n${err.stack}`\n )\n }\n break\n }\n default: {\n const check: never = payload\n return check\n }\n }\n}\n\nfunction notifyListeners(\n event: 'vite:beforeUpdate',\n payload: UpdatePayload\n): void\nfunction notifyListeners(event: 'vite:beforePrune', payload: PrunePayload): void\nfunction notifyListeners(\n event: 'vite:beforeFullReload',\n payload: FullReloadPayload\n): void\nfunction notifyListeners(event: 'vite:error', payload: ErrorPayload): void\nfunction notifyListeners<T extends string>(\n event: CustomEventName<T>,\n data: any\n): void\nfunction notifyListeners(event: string, data: any): void {\n const cbs = customListenersMap.get(event)\n if (cbs) {\n cbs.forEach((cb) => cb(data))\n }\n}\n\nconst enableOverlay = __HMR_ENABLE_OVERLAY__\n\nfunction createErrorOverlay(err: ErrorPayload['err']) {\n if (!enableOverlay) return\n clearErrorOverlay()\n document.body.appendChild(new ErrorOverlay(err))\n}\n\nfunction clearErrorOverlay() {\n document\n .querySelectorAll(overlayId)\n .forEach((n) => (n as ErrorOverlay).close())\n}\n\nfunction hasErrorOverlay() {\n return document.querySelectorAll(overlayId).length\n}\n\nlet pending = false\nlet queued: Promise<(() => void) | undefined>[] = []\n\n/**\n * buffer multiple hot updates triggered by the same src change\n * so that they are invoked in the same order they were sent.\n * (otherwise the order may be inconsistent because of the http request round trip)\n */\nasync function queueUpdate(p: Promise<(() => void) | undefined>) {\n queued.push(p)\n if (!pending) {\n pending = true\n await Promise.resolve()\n pending = false\n const loading = [...queued]\n queued = []\n ;(await Promise.all(loading)).forEach((fn) => fn && fn())\n }\n}\n\nasync function waitForSuccessfulPing(ms = 1000) {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n try {\n await fetch(`${base}__vite_ping`)\n break\n } catch (e) {\n await new Promise((resolve) => setTimeout(resolve, ms))\n }\n }\n}\n\n// ping server\nsocket.addEventListener('close', async ({ wasClean }) => {\n if (wasClean) return\n console.log(`[vite] server connection lost. polling for restart...`)\n await waitForSuccessfulPing()\n location.reload()\n})\n\n// https://wicg.github.io/construct-stylesheets\nconst supportsConstructedSheet = (() => {\n // TODO: re-enable this try block once Chrome fixes the performance of\n // rule insertion in really big stylesheets\n // try {\n // new CSSStyleSheet()\n // return true\n // } catch (e) {}\n return false\n})()\n\nconst sheetsMap = new Map()\n\nexport function updateStyle(id: string, content: string): void {\n let style = sheetsMap.get(id)\n if (supportsConstructedSheet && !content.includes('@import')) {\n if (style && !(style instanceof CSSStyleSheet)) {\n removeStyle(id)\n style = undefined\n }\n\n if (!style) {\n style = new CSSStyleSheet()\n style.replaceSync(content)\n // @ts-expect-error: using experimental API\n document.adoptedStyleSheets = [...document.adoptedStyleSheets, style]\n } else {\n style.replaceSync(content)\n }\n } else {\n if (style && !(style instanceof HTMLStyleElement)) {\n removeStyle(id)\n style = undefined\n }\n\n if (!style) {\n style = document.createElement('style')\n style.setAttribute('type', 'text/css')\n style.innerHTML = content\n document.head.appendChild(style)\n } else {\n style.innerHTML = content\n }\n }\n sheetsMap.set(id, style)\n}\n\nexport function removeStyle(id: string): void {\n const style = sheetsMap.get(id)\n if (style) {\n if (style instanceof CSSStyleSheet) {\n // @ts-expect-error: using experimental API\n document.adoptedStyleSheets = document.adoptedStyleSheets.filter(\n (s: CSSStyleSheet) => s !== style\n )\n } else {\n document.head.removeChild(style)\n }\n sheetsMap.delete(id)\n }\n}\n\nasync function fetchUpdate({ path, acceptedPath, timestamp }: Update) {\n const mod = hotModulesMap.get(path)\n if (!mod) {\n // In a code-splitting project,\n // it is common that the hot-updating module is not loaded yet.\n // https://github.com/vitejs/vite/issues/721\n return\n }\n\n const moduleMap = new Map()\n const isSelfUpdate = path === acceptedPath\n\n // make sure we only import each dep once\n const modulesToUpdate = new Set<string>()\n if (isSelfUpdate) {\n // self update - only update self\n modulesToUpdate.add(path)\n } else {\n // dep update\n for (const { deps } of mod.callbacks) {\n deps.forEach((dep) => {\n if (acceptedPath === dep) {\n modulesToUpdate.add(dep)\n }\n })\n }\n }\n\n // determine the qualified callbacks before we re-import the modules\n const qualifiedCallbacks = mod.callbacks.filter(({ deps }) => {\n return deps.some((dep) => modulesToUpdate.has(dep))\n })\n\n await Promise.all(\n Array.from(modulesToUpdate).map(async (dep) => {\n const disposer = disposeMap.get(dep)\n if (disposer) await disposer(dataMap.get(dep))\n const [path, query] = dep.split(`?`)\n try {\n const newMod = await import(\n /* @vite-ignore */\n base +\n path.slice(1) +\n `?import&t=${timestamp}${query ? `&${query}` : ''}`\n )\n moduleMap.set(dep, newMod)\n } catch (e) {\n warnFailedFetch(e, dep)\n }\n })\n )\n\n return () => {\n for (const { deps, fn } of qualifiedCallbacks) {\n fn(deps.map((dep) => moduleMap.get(dep)))\n }\n const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`\n console.log(`[vite] hot updated: ${loggedPath}`)\n }\n}\n\ninterface HotModule {\n id: string\n callbacks: HotCallback[]\n}\n\ninterface HotCallback {\n // the dependencies must be fetchable paths\n deps: string[]\n fn: (modules: object[]) => void\n}\n\nconst hotModulesMap = new Map<string, HotModule>()\nconst disposeMap = new Map<string, (data: any) => void | Promise<void>>()\nconst pruneMap = new Map<string, (data: any) => void | Promise<void>>()\nconst dataMap = new Map<string, any>()\nconst customListenersMap = new Map<string, ((data: any) => void)[]>()\nconst ctxToListenersMap = new Map<\n string,\n Map<string, ((data: any) => void)[]>\n>()\n\n// Just infer the return type for now\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const createHotContext = (ownerPath: string) => {\n if (!dataMap.has(ownerPath)) {\n dataMap.set(ownerPath, {})\n }\n\n // when a file is hot updated, a new context is created\n // clear its stale callbacks\n const mod = hotModulesMap.get(ownerPath)\n if (mod) {\n mod.callbacks = []\n }\n\n // clear stale custom event listeners\n const staleListeners = ctxToListenersMap.get(ownerPath)\n if (staleListeners) {\n for (const [event, staleFns] of staleListeners) {\n const listeners = customListenersMap.get(event)\n if (listeners) {\n customListenersMap.set(\n event,\n listeners.filter((l) => !staleFns.includes(l))\n )\n }\n }\n }\n\n const newListeners = new Map()\n ctxToListenersMap.set(ownerPath, newListeners)\n\n function acceptDeps(deps: string[], callback: HotCallback['fn'] = () => {}) {\n const mod: HotModule = hotModulesMap.get(ownerPath) || {\n id: ownerPath,\n callbacks: []\n }\n mod.callbacks.push({\n deps,\n fn: callback\n })\n hotModulesMap.set(ownerPath, mod)\n }\n\n const hot = {\n get data() {\n return dataMap.get(ownerPath)\n },\n\n accept(deps: any, callback?: any) {\n if (typeof deps === 'function' || !deps) {\n // self-accept: hot.accept(() => {})\n acceptDeps([ownerPath], ([mod]) => deps && deps(mod))\n } else if (typeof deps === 'string') {\n // explicit deps\n acceptDeps([deps], ([mod]) => callback && callback(mod))\n } else if (Array.isArray(deps)) {\n acceptDeps(deps, callback)\n } else {\n throw new Error(`invalid hot.accept() usage.`)\n }\n },\n\n acceptDeps() {\n throw new Error(\n `hot.acceptDeps() is deprecated. ` +\n `Use hot.accept() with the same signature instead.`\n )\n },\n\n dispose(cb: (data: any) => void) {\n disposeMap.set(ownerPath, cb)\n },\n\n prune(cb: (data: any) => void) {\n pruneMap.set(ownerPath, cb)\n },\n\n // TODO\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n decline() {},\n\n invalidate() {\n // TODO should tell the server to re-perform hmr propagation\n // from this module as root\n location.reload()\n },\n\n // custom events\n on: (event: string, cb: (data: any) => void) => {\n const addToMap = (map: Map<string, any[]>) => {\n const existing = map.get(event) || []\n existing.push(cb)\n map.set(event, existing)\n }\n addToMap(customListenersMap)\n addToMap(newListeners)\n }\n }\n\n return hot\n}\n\n/**\n * urls here are dynamic import() urls that couldn't be statically analyzed\n */\nexport function injectQuery(url: string, queryToInject: string): string {\n // skip urls that won't be handled by vite\n if (!url.startsWith('.') && !url.startsWith('/')) {\n return url\n }\n\n // can't use pathname from URL since it may be relative like ../\n const pathname = url.replace(/#.*$/, '').replace(/\\?.*$/, '')\n const { search, hash } = new URL(url, 'http://vitejs.dev')\n\n return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${\n hash || ''\n }`\n}\n\nexport { ErrorOverlay }\n"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GzB,CAAA;AAED,MAAM,MAAM,GAAG,gCAAgC,CAAA;AAC/C,MAAM,WAAW,GAAG,0CAA0C,CAAA;MAEjD,YAAa,SAAQ,WAAW;IAG3C,YAAY,GAAwB;;QAClC,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;QAC/C,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QAE9B,WAAW,CAAC,SAAS,GAAG,CAAC,CAAA;QACzB,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACzD,MAAM,OAAO,GAAG,QAAQ;cACpB,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;cACpC,GAAG,CAAC,O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
var build = require('./dep-ff3ab196.js');
|
|
4
4
|
var require$$1 = require('crypto');
|
|
5
5
|
require('fs');
|
|
6
6
|
require('path');
|
|
@@ -19367,12 +19367,12 @@ pki.privateKeyInfoToPem = function(pki, maxline) {
|
|
|
19367
19367
|
// this RFC in section 4.1.2.2 requires serial numbers to be positive
|
|
19368
19368
|
// http://www.ietf.org/rfc/rfc5280.txt
|
|
19369
19369
|
function toPositiveHex(hexString) {
|
|
19370
|
-
let
|
|
19371
|
-
if (
|
|
19370
|
+
let mostSignificativeHexAsInt = parseInt(hexString[0], 16);
|
|
19371
|
+
if (mostSignificativeHexAsInt < 8) {
|
|
19372
19372
|
return hexString;
|
|
19373
19373
|
}
|
|
19374
|
-
|
|
19375
|
-
return
|
|
19374
|
+
mostSignificativeHexAsInt -= 8;
|
|
19375
|
+
return mostSignificativeHexAsInt.toString() + hexString.substring(1);
|
|
19376
19376
|
}
|
|
19377
19377
|
function createCertificate() {
|
|
19378
19378
|
const days = 30;
|
|
@@ -2041,7 +2041,7 @@ function slash$1(p) {
|
|
|
2041
2041
|
function unwrapId$1(id) {
|
|
2042
2042
|
return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length) : id;
|
|
2043
2043
|
}
|
|
2044
|
-
const flattenId = (id) => id.replace(/(\s*>\s*)/g, '__').replace(/[
|
|
2044
|
+
const flattenId = (id) => id.replace(/(\s*>\s*)/g, '__').replace(/[\/\.:]/g, '_');
|
|
2045
2045
|
const normalizeId = (id) => id.replace(/(\s*>\s*)/g, ' > ');
|
|
2046
2046
|
//TODO: revisit later to see if the edge case that "compiling using node v12 code to be run in node v16 in the server" is what we intend to support.
|
|
2047
2047
|
const builtins$2 = new Set([
|
|
@@ -2177,7 +2177,7 @@ function injectQuery(url, queryToInject) {
|
|
|
2177
2177
|
pathname = pathname.slice(1);
|
|
2178
2178
|
}
|
|
2179
2179
|
pathname = decodeURIComponent(pathname);
|
|
2180
|
-
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${hash
|
|
2180
|
+
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${hash !== null && hash !== void 0 ? hash : ''}`;
|
|
2181
2181
|
}
|
|
2182
2182
|
const timestampRE = /\bt=\d{13}&?\b/;
|
|
2183
2183
|
function removeTimestampQuery(url) {
|
|
@@ -2415,7 +2415,7 @@ async function processSrcSet(srcs, replacer) {
|
|
|
2415
2415
|
};
|
|
2416
2416
|
}));
|
|
2417
2417
|
return ret.reduce((prev, { url, descriptor }, index) => {
|
|
2418
|
-
descriptor
|
|
2418
|
+
descriptor !== null && descriptor !== void 0 ? descriptor : (descriptor = '');
|
|
2419
2419
|
return (prev +=
|
|
2420
2420
|
url + ` ${descriptor}${index === ret.length - 1 ? '' : ', '}`);
|
|
2421
2421
|
}, '');
|
|
@@ -4312,6 +4312,9 @@ const emittedHashMap = new WeakMap();
|
|
|
4312
4312
|
function assetPlugin(config) {
|
|
4313
4313
|
// assetHashToFilenameMap initialization in buildStart causes getAssetFilename to return undefined
|
|
4314
4314
|
assetHashToFilenameMap.set(config, new Map());
|
|
4315
|
+
// add own dictionary entry by directly assigning mrmine
|
|
4316
|
+
// https://github.com/lukeed/mrmime/issues/3
|
|
4317
|
+
mimes['ico'] = 'image/x-icon';
|
|
4315
4318
|
return {
|
|
4316
4319
|
name: 'vite:asset',
|
|
4317
4320
|
buildStart() {
|
|
@@ -5668,7 +5671,7 @@ const append$1 = (queue = '', stash = '', enclose = false) => {
|
|
|
5668
5671
|
return utils$g.flatten(result);
|
|
5669
5672
|
};
|
|
5670
5673
|
|
|
5671
|
-
const expand$
|
|
5674
|
+
const expand$3 = (ast, options = {}) => {
|
|
5672
5675
|
let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
|
|
5673
5676
|
|
|
5674
5677
|
let walk = (node, parent = {}) => {
|
|
@@ -5748,7 +5751,7 @@ const expand$4 = (ast, options = {}) => {
|
|
|
5748
5751
|
return utils$g.flatten(walk(ast));
|
|
5749
5752
|
};
|
|
5750
5753
|
|
|
5751
|
-
var expand_1
|
|
5754
|
+
var expand_1 = expand$3;
|
|
5752
5755
|
|
|
5753
5756
|
var constants$6 = {
|
|
5754
5757
|
MAX_LENGTH: 1024 * 64,
|
|
@@ -6137,7 +6140,7 @@ var parse_1$2 = parse$m;
|
|
|
6137
6140
|
|
|
6138
6141
|
const stringify$4 = stringify$8;
|
|
6139
6142
|
const compile = compile_1;
|
|
6140
|
-
const expand$
|
|
6143
|
+
const expand$2 = expand_1;
|
|
6141
6144
|
const parse$l = parse_1$2;
|
|
6142
6145
|
|
|
6143
6146
|
/**
|
|
@@ -6257,7 +6260,7 @@ braces$2.expand = (input, options = {}) => {
|
|
|
6257
6260
|
input = braces$2.parse(input, options);
|
|
6258
6261
|
}
|
|
6259
6262
|
|
|
6260
|
-
let result = expand$
|
|
6263
|
+
let result = expand$2(input, options);
|
|
6261
6264
|
|
|
6262
6265
|
// filter out empty strings if specified
|
|
6263
6266
|
if (options.noempty === true) {
|
|
@@ -18866,8 +18869,13 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
18866
18869
|
const postcssOptions = (postcssConfig && postcssConfig.options) || {};
|
|
18867
18870
|
const postcssPlugins = postcssConfig && postcssConfig.plugins ? postcssConfig.plugins.slice() : [];
|
|
18868
18871
|
if (needInlineImport) {
|
|
18872
|
+
const isHTMLProxy = htmlProxyRE$1.test(id);
|
|
18869
18873
|
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-ec2e68f4.js'); }).then(function (n) { return n.index; })).default({
|
|
18870
18874
|
async resolve(id, basedir) {
|
|
18875
|
+
const publicFile = checkPublicFile(id, config);
|
|
18876
|
+
if (isHTMLProxy && publicFile) {
|
|
18877
|
+
return publicFile;
|
|
18878
|
+
}
|
|
18871
18879
|
const resolved = await atImportResolvers.css(id, path__default.join(basedir, '*'));
|
|
18872
18880
|
if (resolved) {
|
|
18873
18881
|
return path__default.resolve(resolved);
|
|
@@ -18880,7 +18888,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
18880
18888
|
replacer: urlReplacer
|
|
18881
18889
|
}));
|
|
18882
18890
|
if (isModule) {
|
|
18883
|
-
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-
|
|
18891
|
+
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-1a638407.js'); }).then(function (n) { return n.index; })).default({
|
|
18884
18892
|
...modulesOptions,
|
|
18885
18893
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
18886
18894
|
modules = _modules;
|
|
@@ -18921,7 +18929,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
18921
18929
|
// record CSS dependencies from @imports
|
|
18922
18930
|
for (const message of postcssResult.messages) {
|
|
18923
18931
|
if (message.type === 'dependency') {
|
|
18924
|
-
deps.add(message.file);
|
|
18932
|
+
deps.add(normalizePath$4(message.file));
|
|
18925
18933
|
}
|
|
18926
18934
|
else if (message.type === 'dir-dependency') {
|
|
18927
18935
|
// https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#3-dependencies
|
|
@@ -20785,20 +20793,24 @@ async function transformImportGlob(source, pos, importer, importIndex, root, nor
|
|
|
20785
20793
|
if (((_a = assertion === null || assertion === void 0 ? void 0 : assertion.assert) === null || _a === void 0 ? void 0 : _a.type) === 'raw') {
|
|
20786
20794
|
entries += ` ${JSON.stringify(file)}: ${JSON.stringify(await fs$n.promises.readFile(path__default.join(base, file), 'utf-8'))},`;
|
|
20787
20795
|
}
|
|
20788
|
-
else if (isEager) {
|
|
20789
|
-
const identifier = `__glob_${importIndex}_${i}`;
|
|
20790
|
-
importsString += `import ${isEagerDefault ? `` : `* as `}${identifier} from ${JSON.stringify(importee)};`;
|
|
20791
|
-
entries += ` ${JSON.stringify(file)}: ${identifier},`;
|
|
20792
|
-
}
|
|
20793
20796
|
else {
|
|
20794
|
-
|
|
20795
|
-
if (
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20797
|
+
const importeeUrl = isCSSRequest(importee) ? `${importee}?used` : importee;
|
|
20798
|
+
if (isEager) {
|
|
20799
|
+
const identifier = `__glob_${importIndex}_${i}`;
|
|
20800
|
+
// css imports injecting a ?used query to export the css string
|
|
20801
|
+
importsString += `import ${isEagerDefault ? `` : `* as `}${identifier} from ${JSON.stringify(importeeUrl)};`;
|
|
20802
|
+
entries += ` ${JSON.stringify(file)}: ${identifier},`;
|
|
20803
|
+
}
|
|
20804
|
+
else {
|
|
20805
|
+
let imp = `import(${JSON.stringify(importeeUrl)})`;
|
|
20806
|
+
if (!normalizeUrl && preload) {
|
|
20807
|
+
imp =
|
|
20808
|
+
`(${isModernFlag}` +
|
|
20809
|
+
`? ${preloadMethod}(()=>${imp},"${preloadMarker}")` +
|
|
20810
|
+
`: ${imp})`;
|
|
20811
|
+
}
|
|
20812
|
+
entries += ` ${JSON.stringify(file)}: () => ${imp},`;
|
|
20800
20813
|
}
|
|
20801
|
-
entries += ` ${JSON.stringify(file)}: () => ${imp},`;
|
|
20802
20814
|
}
|
|
20803
20815
|
}
|
|
20804
20816
|
return {
|
|
@@ -21240,7 +21252,7 @@ function polyfill() {
|
|
|
21240
21252
|
}
|
|
21241
21253
|
}
|
|
21242
21254
|
|
|
21243
|
-
const htmlProxyRE = /\?html-proxy[&inline\-css]*&index=(\d+)\.(js|css)$/;
|
|
21255
|
+
const htmlProxyRE = /\?html-proxy=?[&inline\-css]*&index=(\d+)\.(js|css)$/;
|
|
21244
21256
|
const inlineCSSRE = /__VITE_INLINE_CSS__([^_]+_\d+)__/g;
|
|
21245
21257
|
const inlineImportRE = /\bimport\s*\(("[^"]*"|'[^']*')\)/g;
|
|
21246
21258
|
const isHTMLProxy = (id) => htmlProxyRE.test(id);
|
|
@@ -21303,7 +21315,7 @@ const assetAttrsConfig = {
|
|
|
21303
21315
|
const isAsyncScriptMap = new WeakMap();
|
|
21304
21316
|
async function traverseHtml(html, filePath, visitor) {
|
|
21305
21317
|
// lazy load compiler
|
|
21306
|
-
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-
|
|
21318
|
+
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-b09e7447.js'); }).then(function (n) { return n.compilerDom_cjs; });
|
|
21307
21319
|
// @vue/compiler-core doesn't like lowercase doctypes
|
|
21308
21320
|
html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
|
|
21309
21321
|
try {
|
|
@@ -22447,6 +22459,10 @@ function esbuildPlugin(options = {}) {
|
|
|
22447
22459
|
.on('change', reloadOnTsconfigChange)
|
|
22448
22460
|
.on('unlink', reloadOnTsconfigChange);
|
|
22449
22461
|
},
|
|
22462
|
+
buildEnd() {
|
|
22463
|
+
// recycle serve to avoid preventing Node self-exit (#6815)
|
|
22464
|
+
server = null;
|
|
22465
|
+
},
|
|
22450
22466
|
async transform(code, id) {
|
|
22451
22467
|
if (filter(id) || filter(cleanUrl(id))) {
|
|
22452
22468
|
const result = await transformWithEsbuild(code, id, options);
|
|
@@ -23692,7 +23708,7 @@ function expandTop(str) {
|
|
|
23692
23708
|
str = '\\{\\}' + str.substr(2);
|
|
23693
23709
|
}
|
|
23694
23710
|
|
|
23695
|
-
return expand$
|
|
23711
|
+
return expand$1(escapeBraces(str), true).map(unescapeBraces);
|
|
23696
23712
|
}
|
|
23697
23713
|
|
|
23698
23714
|
function embrace(str) {
|
|
@@ -23709,7 +23725,7 @@ function gte(i, y) {
|
|
|
23709
23725
|
return i >= y;
|
|
23710
23726
|
}
|
|
23711
23727
|
|
|
23712
|
-
function expand$
|
|
23728
|
+
function expand$1(str, isTop) {
|
|
23713
23729
|
var expansions = [];
|
|
23714
23730
|
|
|
23715
23731
|
var m = balanced('{', '}', str);
|
|
@@ -23723,7 +23739,7 @@ function expand$2(str, isTop) {
|
|
|
23723
23739
|
// {a},b}
|
|
23724
23740
|
if (m.post.match(/,.*\}/)) {
|
|
23725
23741
|
str = m.pre + '{' + m.body + escClose + m.post;
|
|
23726
|
-
return expand$
|
|
23742
|
+
return expand$1(str);
|
|
23727
23743
|
}
|
|
23728
23744
|
return [str];
|
|
23729
23745
|
}
|
|
@@ -23735,10 +23751,10 @@ function expand$2(str, isTop) {
|
|
|
23735
23751
|
n = parseCommaParts(m.body);
|
|
23736
23752
|
if (n.length === 1) {
|
|
23737
23753
|
// x{{a,b}}y ==> x{a}y x{b}y
|
|
23738
|
-
n = expand$
|
|
23754
|
+
n = expand$1(n[0], false).map(embrace);
|
|
23739
23755
|
if (n.length === 1) {
|
|
23740
23756
|
var post = m.post.length
|
|
23741
|
-
? expand$
|
|
23757
|
+
? expand$1(m.post, false)
|
|
23742
23758
|
: [''];
|
|
23743
23759
|
return post.map(function(p) {
|
|
23744
23760
|
return m.pre + n[0] + p;
|
|
@@ -23753,7 +23769,7 @@ function expand$2(str, isTop) {
|
|
|
23753
23769
|
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
23754
23770
|
var pre = m.pre;
|
|
23755
23771
|
var post = m.post.length
|
|
23756
|
-
? expand$
|
|
23772
|
+
? expand$1(m.post, false)
|
|
23757
23773
|
: [''];
|
|
23758
23774
|
|
|
23759
23775
|
var N;
|
|
@@ -23797,7 +23813,7 @@ function expand$2(str, isTop) {
|
|
|
23797
23813
|
N.push(c);
|
|
23798
23814
|
}
|
|
23799
23815
|
} else {
|
|
23800
|
-
N = concatMap(n, function(el) { return expand$
|
|
23816
|
+
N = concatMap(n, function(el) { return expand$1(el, false) });
|
|
23801
23817
|
}
|
|
23802
23818
|
|
|
23803
23819
|
for (var j = 0; j < N.length; j++) {
|
|
@@ -23820,7 +23836,7 @@ try {
|
|
|
23820
23836
|
} catch (er) {}
|
|
23821
23837
|
|
|
23822
23838
|
var GLOBSTAR$1 = minimatch$3.GLOBSTAR = Minimatch$1.GLOBSTAR = {};
|
|
23823
|
-
var expand
|
|
23839
|
+
var expand = braceExpansion;
|
|
23824
23840
|
|
|
23825
23841
|
var plTypes = {
|
|
23826
23842
|
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
|
@@ -24065,7 +24081,7 @@ function braceExpand (pattern, options) {
|
|
|
24065
24081
|
return [pattern]
|
|
24066
24082
|
}
|
|
24067
24083
|
|
|
24068
|
-
return expand
|
|
24084
|
+
return expand(pattern)
|
|
24069
24085
|
}
|
|
24070
24086
|
|
|
24071
24087
|
// parse a component of the expanded set.
|
|
@@ -29546,7 +29562,7 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
|
|
|
29546
29562
|
// map relative based on exports data
|
|
29547
29563
|
if (exportsField) {
|
|
29548
29564
|
if (isObject$3(exportsField) && !Array.isArray(exportsField)) {
|
|
29549
|
-
relativeId = resolveExports(data, relativeId, options, targetWeb);
|
|
29565
|
+
relativeId = resolveExports(data, cleanUrl(relativeId), options, targetWeb);
|
|
29550
29566
|
}
|
|
29551
29567
|
else {
|
|
29552
29568
|
// not exposed
|
|
@@ -29788,6 +29804,7 @@ function ssrManifestPlugin(config) {
|
|
|
29788
29804
|
return {
|
|
29789
29805
|
name: 'vite:ssr-manifest',
|
|
29790
29806
|
generateBundle(_options, bundle) {
|
|
29807
|
+
var _a;
|
|
29791
29808
|
for (const file in bundle) {
|
|
29792
29809
|
const chunk = bundle[file];
|
|
29793
29810
|
if (chunk.type === 'chunk') {
|
|
@@ -29799,7 +29816,7 @@ function ssrManifestPlugin(config) {
|
|
|
29799
29816
|
const assetFiles = chunkToEmittedAssetsMap.get(chunk);
|
|
29800
29817
|
for (const id in chunk.modules) {
|
|
29801
29818
|
const normalizedId = normalizePath$4(path$r.relative(config.root, id));
|
|
29802
|
-
const mappedChunks = ssrManifest[normalizedId]
|
|
29819
|
+
const mappedChunks = (_a = ssrManifest[normalizedId]) !== null && _a !== void 0 ? _a : (ssrManifest[normalizedId] = []);
|
|
29803
29820
|
if (!chunk.isEntry) {
|
|
29804
29821
|
mappedChunks.push(base + chunk.fileName);
|
|
29805
29822
|
}
|
|
@@ -38756,7 +38773,7 @@ function assetImportMetaUrlPlugin(config) {
|
|
|
38756
38773
|
name: 'vite:asset-import-meta-url',
|
|
38757
38774
|
async transform(code, id, options) {
|
|
38758
38775
|
if (code.includes('new URL') && code.includes(`import.meta.url`)) {
|
|
38759
|
-
const importMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\)/g;
|
|
38776
|
+
const importMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*,?\s*\)/g;
|
|
38760
38777
|
const noCommentsCode = code
|
|
38761
38778
|
.replace(multilineCommentsRE$1, (m) => ' '.repeat(m.length))
|
|
38762
38779
|
.replace(singlelineCommentsRE$1, (m) => ' '.repeat(m.length));
|
|
@@ -45011,7 +45028,7 @@ async function resolveHttpServer({ proxy }, app, httpsOptions) {
|
|
|
45011
45028
|
async function resolveHttpsConfig(https, cacheDir) {
|
|
45012
45029
|
if (!https)
|
|
45013
45030
|
return undefined;
|
|
45014
|
-
const httpsOption = isObject$3(https) ? https : {};
|
|
45031
|
+
const httpsOption = isObject$3(https) ? { ...https } : {};
|
|
45015
45032
|
const { ca, cert, key, pfx } = httpsOption;
|
|
45016
45033
|
Object.assign(httpsOption, {
|
|
45017
45034
|
ca: readFileIfExists(ca),
|
|
@@ -45048,7 +45065,7 @@ async function getCertificate(cacheDir) {
|
|
|
45048
45065
|
return content;
|
|
45049
45066
|
}
|
|
45050
45067
|
catch {
|
|
45051
|
-
const content = (await Promise.resolve().then(function () { return require('./dep-
|
|
45068
|
+
const content = (await Promise.resolve().then(function () { return require('./dep-7e724347.js'); })).createCertificate();
|
|
45052
45069
|
fs$n.promises
|
|
45053
45070
|
.mkdir(cacheDir, { recursive: true })
|
|
45054
45071
|
.then(() => fs$n.promises.writeFile(cachePath, content))
|
|
@@ -52129,7 +52146,7 @@ async function ssrTransform(code, inMap, url) {
|
|
|
52129
52146
|
return importId;
|
|
52130
52147
|
}
|
|
52131
52148
|
function defineExport(position, name, local = name) {
|
|
52132
|
-
s.
|
|
52149
|
+
s.appendLeft(position, `\nObject.defineProperty(${ssrModuleExportsKey}, "${name}", ` +
|
|
52133
52150
|
`{ enumerable: true, configurable: true, get(){ return ${local} }});`);
|
|
52134
52151
|
}
|
|
52135
52152
|
// 1. check all import statements and record id -> importName map
|
|
@@ -53224,8 +53241,25 @@ const devHtmlHook = async (html, { path: htmlPath, server, originalUrl }) => {
|
|
|
53224
53241
|
const { config, moduleGraph } = server;
|
|
53225
53242
|
const base = config.base || '/';
|
|
53226
53243
|
const s = new MagicString(html);
|
|
53227
|
-
let
|
|
53244
|
+
let inlineModuleIndex = -1;
|
|
53228
53245
|
const filePath = cleanUrl(htmlPath);
|
|
53246
|
+
const addInlineModule = (node, ext) => {
|
|
53247
|
+
inlineModuleIndex++;
|
|
53248
|
+
const url = filePath.replace(normalizePath$4(config.root), '');
|
|
53249
|
+
const contents = node.children
|
|
53250
|
+
.map((child) => child.content || '')
|
|
53251
|
+
.join('');
|
|
53252
|
+
// add HTML Proxy to Map
|
|
53253
|
+
addToHTMLProxyCache(config, url, inlineModuleIndex, contents);
|
|
53254
|
+
// inline js module. convert to src="proxy"
|
|
53255
|
+
const modulePath = `${config.base + htmlPath.slice(1)}?html-proxy&index=${inlineModuleIndex}.${ext}`;
|
|
53256
|
+
// invalidate the module so the newly cached contents will be served
|
|
53257
|
+
const module = server === null || server === void 0 ? void 0 : server.moduleGraph.getModuleById(modulePath);
|
|
53258
|
+
if (module) {
|
|
53259
|
+
server === null || server === void 0 ? void 0 : server.moduleGraph.invalidateModule(module);
|
|
53260
|
+
}
|
|
53261
|
+
s.overwrite(node.loc.start.offset, node.loc.end.offset, `<script type="module" src="${modulePath}"></script>`);
|
|
53262
|
+
};
|
|
53229
53263
|
await traverseHtml(html, htmlPath, (node) => {
|
|
53230
53264
|
if (node.type !== 1 /* ELEMENT */) {
|
|
53231
53265
|
return;
|
|
@@ -53233,29 +53267,16 @@ const devHtmlHook = async (html, { path: htmlPath, server, originalUrl }) => {
|
|
|
53233
53267
|
// script tags
|
|
53234
53268
|
if (node.tag === 'script') {
|
|
53235
53269
|
const { src, isModule } = getScriptInfo(node);
|
|
53236
|
-
if (isModule) {
|
|
53237
|
-
scriptModuleIndex++;
|
|
53238
|
-
}
|
|
53239
53270
|
if (src) {
|
|
53240
53271
|
processNodeUrl(src, s, config, htmlPath, originalUrl, moduleGraph);
|
|
53241
53272
|
}
|
|
53242
53273
|
else if (isModule) {
|
|
53243
|
-
|
|
53244
|
-
const contents = node.children
|
|
53245
|
-
.map((child) => child.content || '')
|
|
53246
|
-
.join('');
|
|
53247
|
-
// add HTML Proxy to Map
|
|
53248
|
-
addToHTMLProxyCache(config, url, scriptModuleIndex, contents);
|
|
53249
|
-
// inline js module. convert to src="proxy"
|
|
53250
|
-
const modulePath = `${config.base + htmlPath.slice(1)}?html-proxy&index=${scriptModuleIndex}.js`;
|
|
53251
|
-
// invalidate the module so the newly cached contents will be served
|
|
53252
|
-
const module = server === null || server === void 0 ? void 0 : server.moduleGraph.getModuleById(modulePath);
|
|
53253
|
-
if (module) {
|
|
53254
|
-
server === null || server === void 0 ? void 0 : server.moduleGraph.invalidateModule(module);
|
|
53255
|
-
}
|
|
53256
|
-
s.overwrite(node.loc.start.offset, node.loc.end.offset, `<script type="module" src="${modulePath}"></script>`);
|
|
53274
|
+
addInlineModule(node, 'js');
|
|
53257
53275
|
}
|
|
53258
53276
|
}
|
|
53277
|
+
if (node.tag === 'style' && node.children.length) {
|
|
53278
|
+
addInlineModule(node, 'css');
|
|
53279
|
+
}
|
|
53259
53280
|
// elements with [href/src] attrs
|
|
53260
53281
|
const assetAttrs = assetAttrsConfig[node.tag];
|
|
53261
53282
|
if (assetAttrs) {
|
|
@@ -55956,7 +55977,7 @@ function ssrRewriteStacktrace(stack, moduleGraph) {
|
|
|
55956
55977
|
.split('\n')
|
|
55957
55978
|
.map((line) => {
|
|
55958
55979
|
return line.replace(/^ {4}at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?)\)?/, (input, varName, url, line, column) => {
|
|
55959
|
-
var _a;
|
|
55980
|
+
var _a, _b, _c;
|
|
55960
55981
|
if (!url)
|
|
55961
55982
|
return input;
|
|
55962
55983
|
const mod = moduleGraph.urlToModuleMap.get(url);
|
|
@@ -55973,7 +55994,7 @@ function ssrRewriteStacktrace(stack, moduleGraph) {
|
|
|
55973
55994
|
if (!pos.source) {
|
|
55974
55995
|
return input;
|
|
55975
55996
|
}
|
|
55976
|
-
const source = `${pos.source}:${pos.line
|
|
55997
|
+
const source = `${pos.source}:${(_b = pos.line) !== null && _b !== void 0 ? _b : 0}:${(_c = pos.column) !== null && _c !== void 0 ? _c : 0}`;
|
|
55977
55998
|
if (!varName || varName === 'eval') {
|
|
55978
55999
|
return ` at ${source}`;
|
|
55979
56000
|
}
|
|
@@ -56062,7 +56083,7 @@ function isBuildOutputEsm(config) {
|
|
|
56062
56083
|
|
|
56063
56084
|
const pendingModules = new Map();
|
|
56064
56085
|
const pendingImports = new Map();
|
|
56065
|
-
async function ssrLoadModule(url, server, context = { global }, urlStack = []) {
|
|
56086
|
+
async function ssrLoadModule(url, server, context = { global }, urlStack = [], fixStacktrace) {
|
|
56066
56087
|
url = unwrapId$1(url).replace(NULL_BYTE_PLACEHOLDER, '\0');
|
|
56067
56088
|
// when we instantiate multiple dependency modules in parallel, they may
|
|
56068
56089
|
// point to shared modules. We need to avoid duplicate instantiation attempts
|
|
@@ -56072,7 +56093,7 @@ async function ssrLoadModule(url, server, context = { global }, urlStack = []) {
|
|
|
56072
56093
|
if (pending) {
|
|
56073
56094
|
return pending;
|
|
56074
56095
|
}
|
|
56075
|
-
const modulePromise = instantiateModule(url, server, context, urlStack);
|
|
56096
|
+
const modulePromise = instantiateModule(url, server, context, urlStack, fixStacktrace);
|
|
56076
56097
|
pendingModules.set(url, modulePromise);
|
|
56077
56098
|
modulePromise
|
|
56078
56099
|
.catch(() => {
|
|
@@ -56083,7 +56104,7 @@ async function ssrLoadModule(url, server, context = { global }, urlStack = []) {
|
|
|
56083
56104
|
});
|
|
56084
56105
|
return modulePromise;
|
|
56085
56106
|
}
|
|
56086
|
-
async function instantiateModule(url, server, context = { global }, urlStack = []) {
|
|
56107
|
+
async function instantiateModule(url, server, context = { global }, urlStack = [], fixStacktrace) {
|
|
56087
56108
|
const { moduleGraph } = server;
|
|
56088
56109
|
const mod = await moduleGraph.ensureEntryFromUrl(url, true);
|
|
56089
56110
|
if (mod.ssrModule) {
|
|
@@ -56136,7 +56157,7 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
|
|
|
56136
56157
|
if (pendingDeps.length === 1) {
|
|
56137
56158
|
pendingImports.set(url, pendingDeps);
|
|
56138
56159
|
}
|
|
56139
|
-
const mod = await ssrLoadModule(dep, server, context, urlStack);
|
|
56160
|
+
const mod = await ssrLoadModule(dep, server, context, urlStack, fixStacktrace);
|
|
56140
56161
|
if (pendingDeps.length === 1) {
|
|
56141
56162
|
pendingImports.delete(url);
|
|
56142
56163
|
}
|
|
@@ -56176,7 +56197,7 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
|
|
|
56176
56197
|
await initModule(context.global, ssrModule, ssrImportMeta, ssrImport, ssrDynamicImport, ssrExportAll);
|
|
56177
56198
|
}
|
|
56178
56199
|
catch (e) {
|
|
56179
|
-
if (e.stack) {
|
|
56200
|
+
if (e.stack && fixStacktrace !== false) {
|
|
56180
56201
|
const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph);
|
|
56181
56202
|
rebindErrorStacktrace(e, stacktrace);
|
|
56182
56203
|
server.config.logger.error(`Error when evaluating SSR module ${url}:\n${stacktrace}`, {
|
|
@@ -56453,11 +56474,11 @@ async function createServer(inlineConfig = {}) {
|
|
|
56453
56474
|
return transformRequest(url, server, options);
|
|
56454
56475
|
},
|
|
56455
56476
|
transformIndexHtml: null,
|
|
56456
|
-
ssrLoadModule(url) {
|
|
56477
|
+
ssrLoadModule(url, opts) {
|
|
56457
56478
|
server._ssrExternals || (server._ssrExternals = resolveSSRExternal(config, server._optimizeDepsMetadata
|
|
56458
56479
|
? Object.keys(server._optimizeDepsMetadata.optimized)
|
|
56459
56480
|
: []));
|
|
56460
|
-
return ssrLoadModule(url, server);
|
|
56481
|
+
return ssrLoadModule(url, server, undefined, undefined, opts === null || opts === void 0 ? void 0 : opts.fixStacktrace);
|
|
56461
56482
|
},
|
|
56462
56483
|
ssrFixStacktrace(e) {
|
|
56463
56484
|
if (e.stack) {
|
|
@@ -70188,7 +70209,7 @@ const normalizedEnvEntry = normalizePath$4(ENV_ENTRY);
|
|
|
70188
70209
|
function clientInjectionsPlugin(config) {
|
|
70189
70210
|
return {
|
|
70190
70211
|
name: 'vite:client-inject',
|
|
70191
|
-
transform(code, id) {
|
|
70212
|
+
transform(code, id, options) {
|
|
70192
70213
|
if (id === normalizedClientEntry || id === normalizedEnvEntry) {
|
|
70193
70214
|
let options = config.server.hmr;
|
|
70194
70215
|
options = options && typeof options !== 'boolean' ? options : {};
|
|
@@ -70223,8 +70244,10 @@ function clientInjectionsPlugin(config) {
|
|
|
70223
70244
|
.replace(`__HMR_TIMEOUT__`, JSON.stringify(timeout))
|
|
70224
70245
|
.replace(`__HMR_ENABLE_OVERLAY__`, JSON.stringify(overlay));
|
|
70225
70246
|
}
|
|
70226
|
-
else if (code.includes('process.env.NODE_ENV')) {
|
|
70227
|
-
// replace process.env.NODE_ENV
|
|
70247
|
+
else if (!(options === null || options === void 0 ? void 0 : options.ssr) && code.includes('process.env.NODE_ENV')) {
|
|
70248
|
+
// replace process.env.NODE_ENV instead of defining a global
|
|
70249
|
+
// for it to avoid shimming a `process` object during dev,
|
|
70250
|
+
// avoiding inconsistencies between dev and build
|
|
70228
70251
|
return code.replace(/\bprocess\.env\.NODE_ENV\b/g, JSON.stringify(config.mode));
|
|
70229
70252
|
}
|
|
70230
70253
|
}
|
|
@@ -70445,7 +70468,8 @@ function definePlugin(config) {
|
|
|
70445
70468
|
function generatePattern(ssr) {
|
|
70446
70469
|
var _a;
|
|
70447
70470
|
const processEnv = {};
|
|
70448
|
-
|
|
70471
|
+
const isNeedProcessEnv = !ssr || ((_a = config.ssr) === null || _a === void 0 ? void 0 : _a.target) === 'webworker';
|
|
70472
|
+
if (isNeedProcessEnv) {
|
|
70449
70473
|
Object.assign(processEnv, {
|
|
70450
70474
|
'process.env.': `({}).`,
|
|
70451
70475
|
'global.process.env.': `({}).`,
|
|
@@ -70453,21 +70477,24 @@ function definePlugin(config) {
|
|
|
70453
70477
|
});
|
|
70454
70478
|
}
|
|
70455
70479
|
const replacements = {
|
|
70456
|
-
...processNodeEnv,
|
|
70480
|
+
...(isNeedProcessEnv ? processNodeEnv : {}),
|
|
70457
70481
|
...userDefine,
|
|
70458
70482
|
...importMetaKeys,
|
|
70459
70483
|
...processEnv
|
|
70460
70484
|
};
|
|
70461
|
-
const
|
|
70462
|
-
|
|
70463
|
-
|
|
70464
|
-
|
|
70465
|
-
|
|
70466
|
-
|
|
70467
|
-
|
|
70468
|
-
|
|
70469
|
-
|
|
70470
|
-
|
|
70485
|
+
const replacementsKeys = Object.keys(replacements);
|
|
70486
|
+
const pattern = replacementsKeys.length
|
|
70487
|
+
? new RegExp(
|
|
70488
|
+
// Do not allow preceding '.', but do allow preceding '...' for spread operations
|
|
70489
|
+
'(?<!(?<!\\.\\.)\\.)\\b(' +
|
|
70490
|
+
replacementsKeys
|
|
70491
|
+
.map((str) => {
|
|
70492
|
+
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
|
|
70493
|
+
})
|
|
70494
|
+
.join('|') +
|
|
70495
|
+
// prevent trailing assignments
|
|
70496
|
+
')\\b(?!\\s*?=[^=])', 'g')
|
|
70497
|
+
: null;
|
|
70471
70498
|
return [replacements, pattern];
|
|
70472
70499
|
}
|
|
70473
70500
|
const defaultPattern = generatePattern(false);
|
|
@@ -70488,6 +70515,9 @@ function definePlugin(config) {
|
|
|
70488
70515
|
return;
|
|
70489
70516
|
}
|
|
70490
70517
|
const [replacements, pattern] = ssr ? ssrPattern : defaultPattern;
|
|
70518
|
+
if (!pattern) {
|
|
70519
|
+
return null;
|
|
70520
|
+
}
|
|
70491
70521
|
if (ssr && !isBuild) {
|
|
70492
70522
|
// ssr + dev, simple replace
|
|
70493
70523
|
return code.replace(pattern, (_, match) => {
|
|
@@ -70625,7 +70655,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
|
|
70625
70655
|
].filter(Boolean);
|
|
70626
70656
|
}
|
|
70627
70657
|
|
|
70628
|
-
var main = {exports: {}};
|
|
70658
|
+
var main$1 = {exports: {}};
|
|
70629
70659
|
|
|
70630
70660
|
const fs = fs__default;
|
|
70631
70661
|
const path = path__default;
|
|
@@ -70766,70 +70796,56 @@ const DotenvModule = {
|
|
|
70766
70796
|
parse
|
|
70767
70797
|
};
|
|
70768
70798
|
|
|
70769
|
-
main.exports.config = DotenvModule.config;
|
|
70770
|
-
main.exports.parse = DotenvModule.parse;
|
|
70771
|
-
main.exports = DotenvModule;
|
|
70799
|
+
main$1.exports.config = DotenvModule.config;
|
|
70800
|
+
main$1.exports.parse = DotenvModule.parse;
|
|
70801
|
+
main$1.exports = DotenvModule;
|
|
70772
70802
|
|
|
70773
|
-
var dotenv = main.exports;
|
|
70803
|
+
var dotenv = main$1.exports;
|
|
70774
70804
|
|
|
70775
|
-
|
|
70776
|
-
|
|
70805
|
+
var dotenvExpand = function (config) {
|
|
70806
|
+
// if ignoring process.env, use a blank object
|
|
70807
|
+
var environment = config.ignoreProcessEnv ? {} : process.env;
|
|
70777
70808
|
|
|
70778
|
-
|
|
70779
|
-
|
|
70780
|
-
if (!parts || parts.length === 0) {
|
|
70781
|
-
return newEnv
|
|
70782
|
-
}
|
|
70809
|
+
var interpolate = function (envValue) {
|
|
70810
|
+
var matches = envValue.match(/(.?\${?(?:[a-zA-Z0-9_]+)?}?)/g) || [];
|
|
70783
70811
|
|
|
70784
|
-
|
|
70812
|
+
return matches.reduce(function (newEnv, match) {
|
|
70813
|
+
var parts = /(.?)\${?([a-zA-Z0-9_]+)?}?/g.exec(match);
|
|
70814
|
+
var prefix = parts[1];
|
|
70785
70815
|
|
|
70786
|
-
|
|
70816
|
+
var value, replacePart;
|
|
70787
70817
|
|
|
70788
|
-
|
|
70789
|
-
|
|
70790
|
-
|
|
70791
|
-
|
|
70792
|
-
|
|
70793
|
-
|
|
70794
|
-
|
|
70795
|
-
|
|
70796
|
-
value = Object.prototype.hasOwnProperty.call(environment, key)
|
|
70797
|
-
? environment[key]
|
|
70798
|
-
: (config.parsed[key] || keyParts[1] || '');
|
|
70799
|
-
|
|
70800
|
-
// If the value is found, remove nested expansions.
|
|
70801
|
-
if (keyParts.length > 1 && value) {
|
|
70802
|
-
const replaceNested = matches[index + 1];
|
|
70803
|
-
matches[index + 1] = '';
|
|
70804
|
-
|
|
70805
|
-
newEnv = newEnv.replace(replaceNested, '');
|
|
70806
|
-
}
|
|
70807
|
-
// Resolve recursive interpolations
|
|
70808
|
-
value = _interpolate(value, environment, config);
|
|
70809
|
-
}
|
|
70818
|
+
if (prefix === '\\') {
|
|
70819
|
+
replacePart = parts[0];
|
|
70820
|
+
value = replacePart.replace('\\$', '$');
|
|
70821
|
+
} else {
|
|
70822
|
+
var key = parts[2];
|
|
70823
|
+
replacePart = parts[0].substring(prefix.length);
|
|
70824
|
+
// process.env value 'wins' over .env file's value
|
|
70825
|
+
value = environment.hasOwnProperty(key) ? environment[key] : (config.parsed[key] || '');
|
|
70810
70826
|
|
|
70811
|
-
|
|
70812
|
-
|
|
70813
|
-
}
|
|
70827
|
+
// Resolve recursive interpolations
|
|
70828
|
+
value = interpolate(value);
|
|
70829
|
+
}
|
|
70814
70830
|
|
|
70815
|
-
|
|
70816
|
-
|
|
70817
|
-
|
|
70831
|
+
return newEnv.replace(replacePart, value)
|
|
70832
|
+
}, envValue)
|
|
70833
|
+
};
|
|
70818
70834
|
|
|
70819
|
-
for (
|
|
70820
|
-
|
|
70835
|
+
for (var configKey in config.parsed) {
|
|
70836
|
+
var value = environment.hasOwnProperty(configKey) ? environment[configKey] : config.parsed[configKey];
|
|
70821
70837
|
|
|
70822
|
-
config.parsed[configKey] =
|
|
70838
|
+
config.parsed[configKey] = interpolate(value);
|
|
70823
70839
|
}
|
|
70824
70840
|
|
|
70825
|
-
for (
|
|
70841
|
+
for (var processKey in config.parsed) {
|
|
70826
70842
|
environment[processKey] = config.parsed[processKey];
|
|
70827
70843
|
}
|
|
70828
70844
|
|
|
70829
70845
|
return config
|
|
70830
|
-
}
|
|
70846
|
+
};
|
|
70831
70847
|
|
|
70832
|
-
var
|
|
70848
|
+
var main = dotenvExpand;
|
|
70833
70849
|
|
|
70834
70850
|
const debug = createDebugger('vite:config');
|
|
70835
70851
|
/**
|
|
@@ -71107,7 +71123,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development')
|
|
|
71107
71123
|
if ((_l = config.build) === null || _l === void 0 ? void 0 : _l.cleanCssOptions) {
|
|
71108
71124
|
logDeprecationWarning('build.cleanCssOptions', 'Vite now uses esbuild for CSS minification.');
|
|
71109
71125
|
}
|
|
71110
|
-
if (((_m = config.build) === null || _m === void 0 ? void 0 : _m.terserOptions) && config.build.minify
|
|
71126
|
+
if (((_m = config.build) === null || _m === void 0 ? void 0 : _m.terserOptions) && config.build.minify !== 'terser') {
|
|
71111
71127
|
logger.warn(colors$1.yellow(`build.terserOptions is specified but build.minify is not set to use Terser. ` +
|
|
71112
71128
|
`Note Vite now defaults to use esbuild for minification. If you still ` +
|
|
71113
71129
|
`prefer Terser, set build.minify to "terser".`));
|
|
@@ -71443,7 +71459,7 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
|
71443
71459
|
debug: ((_a = process.env.DEBUG) === null || _a === void 0 ? void 0 : _a.includes('vite:dotenv')) || undefined
|
|
71444
71460
|
});
|
|
71445
71461
|
// let environment variables use each other
|
|
71446
|
-
|
|
71462
|
+
main({
|
|
71447
71463
|
parsed,
|
|
71448
71464
|
// prevent process.env mutation
|
|
71449
71465
|
ignoreProcessEnv: true
|
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 build = require('./chunks/dep-
|
|
4
|
+
var build = require('./chunks/dep-ff3ab196.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -670,7 +670,7 @@ cli
|
|
|
670
670
|
.option('-m, --mode <mode>', `[string] set env mode`);
|
|
671
671
|
// dev
|
|
672
672
|
cli
|
|
673
|
-
.command('[root]') // default command
|
|
673
|
+
.command('[root]', 'start dev server') // default command
|
|
674
674
|
.alias('serve') // the command is called 'serve' in Vite's API
|
|
675
675
|
.alias('dev') // alias to align with the script name
|
|
676
676
|
.option('--host [host]', `[string] specify hostname`)
|
|
@@ -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-ff3ab196.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -718,7 +718,7 @@ cli
|
|
|
718
718
|
});
|
|
719
719
|
// build
|
|
720
720
|
cli
|
|
721
|
-
.command('build [root]')
|
|
721
|
+
.command('build [root]', 'build for production')
|
|
722
722
|
.option('--target <target>', `[string] transpile target (default: 'modules')`)
|
|
723
723
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
724
724
|
.option('--assetsDir <dir>', `[string] directory under outDir to place assets in (default: _assets)`)
|
|
@@ -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: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-ff3ab196.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build$1({
|
|
@@ -752,10 +752,10 @@ cli
|
|
|
752
752
|
});
|
|
753
753
|
// optimize
|
|
754
754
|
cli
|
|
755
|
-
.command('optimize [root]')
|
|
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-ff3ab196.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -771,14 +771,14 @@ cli
|
|
|
771
771
|
}
|
|
772
772
|
});
|
|
773
773
|
cli
|
|
774
|
-
.command('preview [root]')
|
|
774
|
+
.command('preview [root]', 'locally preview production build')
|
|
775
775
|
.option('--host [host]', `[string] specify hostname`)
|
|
776
776
|
.option('--port <port>', `[number] specify port`)
|
|
777
777
|
.option('--strictPort', `[boolean] exit if specified port is already in use`)
|
|
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-ff3ab196.js'); }).then(function (n) { return n.preview$1; });
|
|
782
782
|
try {
|
|
783
783
|
const server = await preview({
|
|
784
784
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -515,8 +515,8 @@ export declare interface DepOptimizationMetadata {
|
|
|
515
515
|
|
|
516
516
|
export declare interface DepOptimizationOptions {
|
|
517
517
|
/**
|
|
518
|
-
* By default, Vite will crawl your index.html to detect dependencies that
|
|
519
|
-
* need to be pre-bundled. If build.rollupOptions.input is specified, Vite
|
|
518
|
+
* By default, Vite will crawl your `index.html` to detect dependencies that
|
|
519
|
+
* need to be pre-bundled. If `build.rollupOptions.input` is specified, Vite
|
|
520
520
|
* will crawl those entry points instead.
|
|
521
521
|
*
|
|
522
522
|
* If neither of these fit your needs, you can specify custom entries using
|
|
@@ -1907,7 +1907,7 @@ export declare interface UserConfig {
|
|
|
1907
1907
|
* the performance. You can use `--force` flag or manually delete the directory
|
|
1908
1908
|
* to regenerate the cache files. The value can be either an absolute file
|
|
1909
1909
|
* system path or a path relative to <root>.
|
|
1910
|
-
* Default to `.vite` when no package.json is detected.
|
|
1910
|
+
* Default to `.vite` when no `package.json` is detected.
|
|
1911
1911
|
* @default 'node_modules/.vite'
|
|
1912
1912
|
*/
|
|
1913
1913
|
cacheDir?: string;
|
|
@@ -2089,7 +2089,9 @@ export declare interface ViteDevServer {
|
|
|
2089
2089
|
/**
|
|
2090
2090
|
* Load a given URL as an instantiated module for SSR.
|
|
2091
2091
|
*/
|
|
2092
|
-
ssrLoadModule(url: string
|
|
2092
|
+
ssrLoadModule(url: string, opts?: {
|
|
2093
|
+
fixStacktrace?: boolean;
|
|
2094
|
+
}): Promise<Record<string, any>>;
|
|
2093
2095
|
/**
|
|
2094
2096
|
* Fix ssr error stacktrace
|
|
2095
2097
|
*/
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"cross-spawn": "^7.0.3",
|
|
88
88
|
"debug": "^4.3.3",
|
|
89
89
|
"dotenv": "^14.3.2",
|
|
90
|
-
"dotenv-expand": "^
|
|
90
|
+
"dotenv-expand": "^5.1.0",
|
|
91
91
|
"es-module-lexer": "^0.9.3",
|
|
92
92
|
"estree-walker": "^2.0.2",
|
|
93
93
|
"etag": "^1.8.1",
|
package/src/client/client.ts
CHANGED
|
@@ -254,7 +254,7 @@ export function updateStyle(id: string, content: string): void {
|
|
|
254
254
|
if (!style) {
|
|
255
255
|
style = new CSSStyleSheet()
|
|
256
256
|
style.replaceSync(content)
|
|
257
|
-
// @ts-
|
|
257
|
+
// @ts-expect-error: using experimental API
|
|
258
258
|
document.adoptedStyleSheets = [...document.adoptedStyleSheets, style]
|
|
259
259
|
} else {
|
|
260
260
|
style.replaceSync(content)
|
|
@@ -281,7 +281,7 @@ export function removeStyle(id: string): void {
|
|
|
281
281
|
const style = sheetsMap.get(id)
|
|
282
282
|
if (style) {
|
|
283
283
|
if (style instanceof CSSStyleSheet) {
|
|
284
|
-
// @ts-
|
|
284
|
+
// @ts-expect-error: using experimental API
|
|
285
285
|
document.adoptedStyleSheets = document.adoptedStyleSheets.filter(
|
|
286
286
|
(s: CSSStyleSheet) => s !== style
|
|
287
287
|
)
|