mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00

* Major package upgrades * Update rust deps and fix a few things * Drop 18 testing * Use node 20 * lint rust * lint * changelog * Drop usage of SVGs, use compound elements. * Update widget API
35 lines
901 B
JavaScript
35 lines
901 B
JavaScript
import { defineConfig } from 'vite'
|
|
import preact from '@preact/preset-vite'
|
|
import { resolve } from 'path'
|
|
import alias from '@rollup/plugin-alias'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [preact()],
|
|
root: 'web',
|
|
base: '',
|
|
optimizeDeps: {
|
|
exclude: ['@vector-im/compound-web'],
|
|
},
|
|
build: {
|
|
outDir: '../public',
|
|
rollupOptions: {
|
|
input: {
|
|
main: resolve('web', 'index.html'),
|
|
oauth: resolve('web', 'oauth.html'),
|
|
},
|
|
plugins: [
|
|
alias({
|
|
entries: [
|
|
{ find: 'react', replacement: 'preact/compat' },
|
|
{ find: 'react-dom/test-utils', replacement: 'preact/test-utils' },
|
|
{ find: 'react-dom', replacement: 'preact/compat' },
|
|
{ find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' }
|
|
]
|
|
})
|
|
]
|
|
},
|
|
emptyOutDir: true,
|
|
},
|
|
})
|