This commit is contained in:
Nicola Benaglia 2025-04-05 19:57:00 +02:00
parent 80791358c5
commit 716de3a409
3 changed files with 63 additions and 59 deletions

View File

@ -2,17 +2,17 @@ module.exports = {
root: true, root: true,
env: { browser: true, es2020: true }, env: { browser: true, es2020: true },
extends: [ extends: [
'eslint:recommended', "eslint:recommended",
'plugin:@typescript-eslint/recommended', "plugin:@typescript-eslint/recommended",
'plugin:react-hooks/recommended', "plugin:react-hooks/recommended",
], ],
ignorePatterns: ['dist', '.eslintrc.cjs'], ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: '@typescript-eslint/parser', parser: "@typescript-eslint/parser",
plugins: ['react-refresh'], plugins: ["react-refresh"],
rules: { rules: {
'react-refresh/only-export-components': [ "react-refresh/only-export-components": [
'off', "off",
{ allowConstantExport: true }, { allowConstantExport: true },
], ],
}, },
} };

View File

@ -1,15 +1,15 @@
import type { CapacitorConfig } from '@capacitor/cli'; import type { CapacitorConfig } from "@capacitor/cli";
const config: CapacitorConfig = { const config: CapacitorConfig = {
appId: 'org.Qortal.Qortal-Hub', appId: "org.Qortal.Qortal-Hub",
appName: 'Qortal-Hub', appName: "Qortal-Hub",
webDir: 'dist', webDir: "dist",
"plugins": { plugins: {
"LocalNotifications": { LocalNotifications: {
"smallIcon": "qort", smallIcon: "qort",
"iconColor": "#09b6e8" iconColor: "#09b6e8",
} },
} },
}; };
export default config; export default config;

View File

@ -1,40 +1,43 @@
/// <reference types="vitest" /> /// <reference types="vitest" />
import { defineConfig } from 'vite'; import { defineConfig } from "vite";
import react from '@vitejs/plugin-react'; import react from "@vitejs/plugin-react";
// Import path module for resolving file paths // Import path module for resolving file paths
import fixReactVirtualized from 'esbuild-plugin-react-virtualized' import fixReactVirtualized from "esbuild-plugin-react-virtualized";
import wasm from 'vite-plugin-wasm'; import wasm from "vite-plugin-wasm";
import topLevelAwait from 'vite-plugin-top-level-await'; import topLevelAwait from "vite-plugin-top-level-await";
import { VitePWA } from 'vite-plugin-pwa'; import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({ export default defineConfig({
test: { test: {
environment: 'jsdom', environment: "jsdom",
globals: true, globals: true,
setupFiles: ['./src/test/setup.ts'] setupFiles: ["./src/test/setup.ts"],
}, },
assetsInclude: ['**/*.wasm'], assetsInclude: ["**/*.wasm"],
plugins: [react(), wasm(), topLevelAwait(), VitePWA({ plugins: [
registerType: 'prompt', react(),
wasm(),
topLevelAwait(),
VitePWA({
registerType: "prompt",
manifest: { manifest: {
name: 'Qortal Hub', name: "Qortal Hub",
short_name: 'Hub', short_name: "Hub",
description: 'Your easy access to the Qortal blockchain', description: "Your easy access to the Qortal blockchain",
start_url: '/', start_url: "/",
display: 'standalone', display: "standalone",
theme_color: '#ffffff', theme_color: "#ffffff",
background_color: '#ffffff', background_color: "#ffffff",
icons: [ icons: [
{ {
src: '/qortal192.png', src: "/qortal192.png",
sizes: '192x192', sizes: "192x192",
type: 'image/png', type: "image/png",
}, },
{ {
src: '/qortal.png', src: "/qortal.png",
sizes: '512x512', sizes: "512x512",
type: 'image/png', type: "image/png",
}, },
], ],
}, },
@ -42,10 +45,11 @@ export default defineConfig({
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit
disableDevLogs: true, // Suppresses logs in development disableDevLogs: true, // Suppresses logs in development
}, },
})], }),
],
optimizeDeps: { optimizeDeps: {
esbuildOptions: { esbuildOptions: {
plugins: [fixReactVirtualized], plugins: [fixReactVirtualized],
} },
} },
}); });