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,51 +1,55 @@
/// <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(),
manifest: { wasm(),
name: 'Qortal Hub', topLevelAwait(),
short_name: 'Hub', VitePWA({
description: 'Your easy access to the Qortal blockchain', registerType: "prompt",
start_url: '/', manifest: {
display: 'standalone', name: "Qortal Hub",
theme_color: '#ffffff', short_name: "Hub",
background_color: '#ffffff', description: "Your easy access to the Qortal blockchain",
icons: [ start_url: "/",
{ display: "standalone",
src: '/qortal192.png', theme_color: "#ffffff",
sizes: '192x192', background_color: "#ffffff",
type: 'image/png', icons: [
}, {
{ src: "/qortal192.png",
src: '/qortal.png', sizes: "192x192",
sizes: '512x512', type: "image/png",
type: 'image/png', },
}, {
], src: "/qortal.png",
}, sizes: "512x512",
workbox: { type: "image/png",
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit },
disableDevLogs: true, // Suppresses logs in development ],
}, },
})], workbox: {
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit
disableDevLogs: true, // Suppresses logs in development
},
}),
],
optimizeDeps: { optimizeDeps: {
esbuildOptions: { esbuildOptions: {
plugins: [fixReactVirtualized], plugins: [fixReactVirtualized],
} },
} },
}); });