Update dependencies

Includes the move from the `svelte-preprocess` package for preprocessing
to `@sveltejs/vite-plugin-svelte` which allows us to use Vite also for
preprocessing.

Also had to remove the `vite-plugin-rewrite-all` again since they don't
support vite@4. So I wrote the plugin myself and without the dependecies
used by `vite-plugin-rewrite-all`.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2022-12-12 10:46:42 +01:00
parent fa0007cda4
commit 7be0a366b3
4 changed files with 947 additions and 928 deletions
+914 -908
View File
File diff suppressed because it is too large Load Diff
+15 -17
View File
@@ -20,27 +20,26 @@
"@playwright/test": "^1.28.1",
"@rsksmart/mock-web3-provider": "^1.0.1",
"@sinonjs/fake-timers": "^10.0.0",
"@sveltejs/vite-plugin-svelte": "^1.3.1",
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"@tsconfig/svelte": "^3.0.0",
"@types/dompurify": "^2.4.0",
"@types/katex": "^0.14.0",
"@types/lodash": "^4.14.191",
"@types/marked": "^4.0.7",
"@types/marked": "^4.0.8",
"@types/md5": "^2.3.2",
"@types/node": "^18.11.10",
"@types/node": "^18.11.13",
"@types/sinonjs__fake-timers": "^8.1.2",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"chalk": "^5.1.2",
"eslint": "^8.28.0",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"chalk": "^5.2.0",
"eslint": "^8.29.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.8.1",
"svelte-check": "^2.10.0",
"prettier": "^2.8.1",
"prettier-plugin-svelte": "^2.9.0",
"svelte-check": "^2.10.2",
"tslib": "^2.4.1",
"typescript": "^4.9.3",
"vite": "^3.2.4",
"vite-plugin-rewrite-all": "^1.0.0",
"vitest": "^0.25.3"
"typescript": "^4.9.4",
"vite": "^4.0.0",
"vitest": "^0.25.7"
},
"dependencies": {
"@ethersproject/abstract-provider": "^5.4.0",
@@ -51,16 +50,15 @@
"dompurify": "^2.4.1",
"ethers": "^5.7.2",
"events": "^3.3.0",
"katex": "^0.16.3",
"katex": "^0.16.4",
"lodash": "^4.17.21",
"lru-cache": "^7.14.1",
"marked": "^4.2.3",
"marked": "^4.2.4",
"md5": "^2.3.0",
"plausible-tracker": "^0.3.8",
"pure-svg-code": "^1.0.6",
"siwe": "^2.0.5",
"svelte": "^3.53.1",
"svelte-preprocess": "^4.10.7",
"svelte": "^3.54.0",
"twemoji": "^14.0.2",
"util": "^0.12.5"
}
+2 -2
View File
@@ -1,5 +1,5 @@
import sveltePreprocess from "svelte-preprocess";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
export default {
preprocess: sveltePreprocess(),
preprocess: vitePreprocess(),
};
+16 -1
View File
@@ -1,7 +1,8 @@
/// <reference types="vitest" />
import type { ViteDevServer } from "vite";
import path from "path";
import pluginRewriteAll from "vite-plugin-rewrite-all";
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
@@ -71,3 +72,17 @@ export default defineConfig({
define: defineConstants(),
});
function pluginRewriteAll() {
return {
name: "rewrite-all",
configureServer(server: ViteDevServer) {
return () => {
server.middlewares.use((req, _res, next) => {
req.url = "/index.html";
next();
});
};
},
};
}