change refresh delay to 2s

This commit is contained in:
SethBurkart123
2024-05-22 13:36:53 +10:00
parent 2e4778812f
commit d1452a5a2b
2 changed files with 30 additions and 23 deletions
+29 -22
View File
@@ -1,35 +1,42 @@
import { defineConfig } from 'vite'
import { crx } from '@crxjs/vite-plugin'
import million from "million/compiler"
import manifest from './manifest.json'
import react from '@vitejs/plugin-react-swc'
import { join } from 'path'
import MillionLint from '@million/lint';
import { defineConfig } from 'vite';
import { crx } from '@crxjs/vite-plugin';
import million from "million/compiler";
import manifest from './manifest.json';
import react from '@vitejs/plugin-react-swc';
import { join } from 'path';
const plugins = [
react(),
million.vite({
auto: {
threshold: 0.005,
// default: 0.1,
skip: [] // default []
}
}),
crx({
manifest
})
];
plugins.unshift(MillionLint.vite())
export default defineConfig({
plugins: [
react(),
million.vite({
auto: {
threshold: 0.005, // default: 0.1,
skip: [], // default []
}
}),
crx({ manifest }),
],
plugins: plugins,
server: {
port: 5173,
hmr: {
host: "localhost",
protocol: "ws",
port: 5173,
},
port: 5173
}
},
build: {
minify: false,
rollupOptions: {
input: {
settings: join(__dirname, 'src', 'interface', 'index.html'),
settings: join(__dirname, 'src', 'interface', 'index.html')
}
},
},
})
}
}
});