Upgrade to Vite 5

This commit upgrades vite to the latest version 5, and also updates the
vite plugins to the latest version.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
pull/827/head
Eng Zer Jun 5 months ago
parent 396b4595f4
commit 374b665089
No known key found for this signature in database
GPG Key ID: DAEBBD2E34C111E6

@ -2,7 +2,7 @@ import Ne, { useState as ke, useRef as ur, useEffect as Pe } from "react";
var ne = { exports: {} }, Y = {}; var ne = { exports: {} }, Y = {};
/** /**
* @license React * @license React
* react-jsx-runtime.production.min.js * react-jsx-runtime.development.js
* *
* Copyright (c) Facebook, Inc. and its affiliates. * Copyright (c) Facebook, Inc. and its affiliates.
* *
@ -11,35 +11,7 @@ var ne = { exports: {} }, Y = {};
*/ */
var Ce; var Ce;
function cr() { function cr() {
if (Ce) return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && function() {
return Y;
Ce = 1;
var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, E = N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function T(b, d, v) {
var m, h = {}, x = null, p = null;
v !== void 0 && (x = "" + v), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (p = d.ref);
for (m in d)
u.call(d, m) && !S.hasOwnProperty(m) && (h[m] = d[m]);
if (b && b.defaultProps)
for (m in d = b.defaultProps, d)
h[m] === void 0 && (h[m] = d[m]);
return { $$typeof: w, type: b, key: x, ref: p, props: h, _owner: E.current };
}
return Y.Fragment = C, Y.jsx = T, Y.jsxs = T, Y;
}
var L = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Oe;
function fr() {
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), b = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, j = "@@iterator"; var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), b = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, j = "@@iterator";
function J(e) { function J(e) {
if (e === null || typeof e != "object") if (e === null || typeof e != "object")
@ -366,7 +338,7 @@ function fr() {
} }
function ye(e) { function ye(e) {
if (Je(e)) if (Je(e))
return g("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", qe(e)), ge(e); return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ge(e);
} }
var W = O.ReactCurrentOwner, Be = { var W = O.ReactCurrentOwner, Be = {
key: !0, key: !0,
@ -621,10 +593,38 @@ Check the top-level render call using <` + t + ">.");
return Se(e, r, t, !1); return Se(e, r, t, !1);
} }
var sr = or, lr = ir; var sr = or, lr = ir;
L.Fragment = u, L.jsx = sr, L.jsxs = lr; Y.Fragment = u, Y.jsx = sr, Y.jsxs = lr;
}()), L; }()), Y;
}
var L = {};
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Oe;
function fr() {
if (Oe)
return L;
Oe = 1;
var N = Ne, w = Symbol.for("react.element"), C = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, E = N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function T(b, d, v) {
var m, h = {}, x = null, p = null;
v !== void 0 && (x = "" + v), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (p = d.ref);
for (m in d)
u.call(d, m) && !S.hasOwnProperty(m) && (h[m] = d[m]);
if (b && b.defaultProps)
for (m in d = b.defaultProps, d)
h[m] === void 0 && (h[m] = d[m]);
return { $$typeof: w, type: b, key: x, ref: p, props: h, _owner: E.current };
}
return L.Fragment = C, L.jsx = T, L.jsxs = T, L;
} }
process.env.NODE_ENV === "production" ? ne.exports = cr() : ne.exports = fr(); process.env.NODE_ENV === "production" ? ne.exports = fr() : ne.exports = cr();
var l = ne.exports; var l = ne.exports;
function dr({ function dr({
question: N = "", question: N = "",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,3 @@
/// <reference types="react" />
declare function App(): JSX.Element;
export default App;

@ -0,0 +1 @@
export { DocsGPTWidget } from "./DocsGPTWidget";

@ -1 +0,0 @@
/// <reference types="vite/client" />

File diff suppressed because it is too large Load Diff

@ -36,12 +36,12 @@
"devDependencies": { "devDependencies": {
"@types/react": "^18.0.26", "@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9", "@types/react-dom": "^18.0.9",
"@vitejs/plugin-react-swc": "^3.0.0", "@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"postcss": "^8.4.31", "postcss": "^8.4.31",
"typescript": "^4.9.3", "typescript": "^4.9.3",
"vite": "^4.4.12", "vite": "^5.0.12",
"vite-plugin-dts": "^1.7.1" "vite-plugin-dts": "^3.7.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

File diff suppressed because it is too large Load Diff

@ -37,7 +37,7 @@
"@types/react-syntax-highlighter": "^15.5.6", "@types/react-syntax-highlighter": "^15.5.6",
"@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0", "@typescript-eslint/parser": "^5.51.0",
"@vitejs/plugin-react": "^3.1.0", "@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",
"eslint": "^8.33.0", "eslint": "^8.33.0",
"eslint-config-prettier": "^8.6.0", "eslint-config-prettier": "^8.6.0",
@ -55,7 +55,7 @@
"prettier-plugin-tailwindcss": "^0.2.2", "prettier-plugin-tailwindcss": "^0.2.2",
"tailwindcss": "^3.2.4", "tailwindcss": "^3.2.4",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"vite": "^4.5.1", "vite": "^5.0.12",
"vite-plugin-svgr": "^2.4.0" "vite-plugin-svgr": "^4.2.0"
} }
} }

@ -4,10 +4,10 @@ import remarkGfm from 'remark-gfm';
import { FEEDBACK, MESSAGE_TYPE } from './conversationModels'; import { FEEDBACK, MESSAGE_TYPE } from './conversationModels';
import classes from './ConversationBubble.module.css'; import classes from './ConversationBubble.module.css';
import Alert from './../assets/alert.svg'; import Alert from './../assets/alert.svg';
import { ReactComponent as Like } from './../assets/like.svg'; import Like from './../assets/like.svg?react';
import { ReactComponent as Dislike } from './../assets/dislike.svg'; import Dislike from './../assets/dislike.svg?react';
import { ReactComponent as Copy } from './../assets/copy.svg'; import Copy from './../assets/copy.svg?react';
import { ReactComponent as CheckMark } from './../assets/checkmark.svg'; import CheckMark from './../assets/checkmark.svg?react';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

7
frontend/svg.d.ts vendored

@ -1,7 +0,0 @@
declare module '*.svg' {
import * as React from 'react';
export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement> & { title?: string }
>;
}

@ -12,10 +12,11 @@
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Node", "moduleResolution": "Node",
"resolveJsonModule": true, "resolveJsonModule": true,
"types": ["vite-plugin-svgr/client"],
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react-jsx" "jsx": "react-jsx"
}, },
"include": ["src", "svg.d.ts"], "include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }] "references": [{ "path": "./tsconfig.node.json" }]
} }

Loading…
Cancel
Save