899a89cb3b
* Add vite, typescript and prettier * Configure vite * Fix tsconfig error * Fix manifest json * Move manifest json to root * Bug fix * Move back manifest json to public
44 lines
759 B
JavaScript
44 lines
759 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import { wasm } from '@rollup/plugin-wasm';
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
|
|
const copyFiles = {
|
|
targets: [
|
|
{
|
|
src: 'node_modules/@matrix-org/olm/olm.wasm',
|
|
dest: '',
|
|
},
|
|
{
|
|
src: '_redirects',
|
|
dest: '',
|
|
},
|
|
{
|
|
src: 'config.json',
|
|
dest: '',
|
|
},
|
|
{
|
|
src: 'public/res/android',
|
|
dest: 'public/',
|
|
}
|
|
],
|
|
}
|
|
|
|
export default defineConfig({
|
|
appType: 'spa',
|
|
publicDir: false,
|
|
server: {
|
|
port: 8080,
|
|
host: true,
|
|
},
|
|
plugins: [
|
|
viteStaticCopy(copyFiles),
|
|
wasm(),
|
|
react(),
|
|
],
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
copyPublicDir: false,
|
|
},
|
|
});
|