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

* Update dependencies * Node 22 is now the new minimum version. * changelog. * Begin porting eslint to new config format. * Make linter happy. * Update reqwest to fix SSL issue? * Fix test types * quick check on ubuntu LTS 24.04 * Change cache key * update rust action * revert mocha due to esminess * Remove the only usage of pqueue * Use babel for TS transformations to get around ESM import bug. * Dependency bundle upgrade * Drop babel, not actually used. * lint * lint * update default config (mostly sections moving around)
42 lines
991 B
JavaScript
42 lines
991 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,
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: 'modern'
|
|
}
|
|
}
|
|
}
|
|
})
|