🚨 Fixes DeepScan warning, fixes (hopefully) Netlify/Vercel deploy

This commit is contained in:
Alicia Sykes
2026-03-09 13:27:38 +00:00
parent 1aa7cdaba5
commit fe4df079d1
3 changed files with 19 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
# Environmental variables for build command
[build.environment]
NODE_VERSION = "20.11.1"
NODE_OPTIONS = "--openssl-legacy-provider"
YARN_FLAGS = "--ignore-engines"
# Redirect the Node endpoints to serverless functions

View File

@@ -90,9 +90,6 @@ export default {
if (!shouldHide) {
window.setTimeout(() => { this.shouldHide = shouldHide; }, this.timeDelay);
window.addEventListener('keyup', this.keyPressEvent);
} else { // Meh, component not needed.
// No point wasting valuable bytes of your 32GB Ram, lets kill it
this.$destroy();
}
},
};

View File

@@ -4,7 +4,7 @@ import { VitePWA } from 'vite-plugin-pwa';
import svgLoader from 'vite-svg-loader';
import path from 'path';
import { fileURLToPath } from 'url';
import { readFileSync } from 'fs';
import { readFileSync, copyFileSync, existsSync, readdirSync } from 'fs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const pkg = JSON.parse(readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8'));
@@ -31,11 +31,28 @@ function serveUserData() {
};
}
function copyUserDataConfig() {
return {
name: 'copy-user-data-config',
closeBundle() {
const outDir = path.resolve(__dirname, 'dist');
if (!existsSync(userDataDir)) return;
const ymlFiles = readdirSync(userDataDir).filter(f => f.endsWith('.yml') || f.endsWith('.yaml'));
for (const file of ymlFiles) {
const src = path.join(userDataDir, file);
const dest = path.join(outDir, file);
copyFileSync(src, dest);
}
},
};
}
export default defineConfig({
plugins: [
vue(),
svgLoader(),
serveUserData(),
copyUserDataConfig(),
VitePWA({
registerType: 'prompt',
manifest: {