Initial diophantine sphere component

This commit is contained in:
2026-06-10 11:41:49 +02:00
commit 6ad4f51838
18 changed files with 8836 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { resolve } from 'path'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
export default defineConfig(({ mode }) => ({
plugins: [react(), cssInjectedByJsPlugin()],
build: {
lib: {
entry: resolve(__dirname, 'src/index.tsx'),
name: 'GlitchComponent',
fileName: 'diophantine-sphere',
formats: ['iife']
},
rollupOptions: {
external: ['react', 'react-dom'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM'
},
assetFileNames: 'assets/[name][extname]'
}
},
sourcemap: true,
minify: mode === 'production'
},
server: {
port: 3002,
open: true
}
}))