1
Fork 0
mirror of https://github.com/RGBCube/cinny synced 2025-07-30 16:37:46 +00:00

Replace Webpack to Vite (#1023)

* 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
This commit is contained in:
Ajay Bura 2022-12-20 20:47:51 +05:30 committed by GitHub
parent 63cb564818
commit 899a89cb3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1111 additions and 7628 deletions

44
vite.config.js Normal file
View file

@ -0,0 +1,44 @@
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,
},
});