mirror of
https://github.com/quantum5/totp.git
synced 2025-04-24 05:31:59 -04:00
27 lines
584 B
TypeScript
27 lines
584 B
TypeScript
import {defineConfig} from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import {nodePolyfills} from 'vite-plugin-node-polyfills';
|
|
import svgr from 'vite-plugin-svgr';
|
|
|
|
function yearPlugin() {
|
|
return {
|
|
name: 'year',
|
|
transformIndexHtml(html: string): string {
|
|
return html.replace('__YEAR__', new Date().getFullYear().toString());
|
|
},
|
|
} as const;
|
|
}
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
svgr(),
|
|
react(),
|
|
yearPlugin(),
|
|
nodePolyfills({
|
|
include: ['buffer'],
|
|
globals: {Buffer: true},
|
|
}),
|
|
],
|
|
});
|