Skip to content

Commit

Permalink
Update vite
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcginnes committed Jul 16, 2024
1 parent b689f93 commit 07b5776
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 177 deletions.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
the browser console (<https://github.com/aws/graph-explorer/pull/474>)
- Update dependencies (<https://github.com/aws/graph-explorer/pull/475>,
<https://github.com/aws/graph-explorer/pull/486>,
<https://github.com/aws/graph-explorer/pull/490>)
<https://github.com/aws/graph-explorer/pull/490>,
<https://github.com/aws/graph-explorer/pull/492>)

## Release 1.8.0

Expand Down
5 changes: 3 additions & 2 deletions packages/graph-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"engines": {
"node": ">=20.12.2"
},
"type": "module",
"scripts": {
"test": "jest",
"dev": "vite",
Expand Down Expand Up @@ -81,7 +82,7 @@
"react-transition-group": "^4.4.5",
"react-virtuoso": "^4.7.10",
"recoil": "^0.7.7",
"swiper": "^8.4.7",
"swiper": "^11.1.5",
"use-deep-compare-effect": "^1.8.1",
"uuid": "^9.0.1"
},
Expand Down Expand Up @@ -136,7 +137,7 @@
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"type-fest": "^4.18.1",
"vite": "^4.5.3",
"vite": "^5.3.3",
"webpack": "^5.91.0",
"whatwg-fetch": "^3.6.20"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
useTransition,
} from "react";
import { CustomArrowProps } from "react-slick";
import { Navigation, Pagination } from "swiper";
import { Navigation, Pagination } from "swiper/modules";
import "swiper/css";
import "swiper/css/navigation";
import { Swiper, SwiperSlide } from "swiper/react";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as localForage from "localforage";
import localForage from "localforage";
import { AtomEffect, DefaultValue } from "recoil";

localForage.config({
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"useUnknownInCatchVariables": false,
Expand Down
12 changes: 6 additions & 6 deletions packages/graph-explorer/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import react from "@vitejs/plugin-react";
import * as fs from "fs";
import { defineConfig, loadEnv } from "vite";
import { defineConfig, loadEnv, PluginOption, ServerOptions } from "vite";

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");

const htmlPlugin = () => {
const htmlPlugin = (): PluginOption => {
return {
name: "html-transform",
transformIndexHtml: {
enforce: "pre",
transform: (html: string) => {
order: "pre",
handler: (html: string) => {
return html.replace(/%(.*?)%/g, function (match, p1) {
return env[p1] ? env[p1] : "";
});
},
},
} as any;
};
};

const serverInfo = () => {
const serverInfo = (): ServerOptions => {
if (
env.GRAPH_EXP_HTTPS_CONNECTION != "false" &&
fs.existsSync("../graph-explorer-proxy-server/cert-info/server.key") &&
Expand Down
Loading

0 comments on commit 07b5776

Please sign in to comment.