Feature/migrate to vite (#349)

* Install dependencies

* Remove dependency react-scripts

* Remove dependency "@babel/plugin-proposal-private-property-in-object"

Was necessary to prevent a react-scripts warning.

* Update scripts in package.json

* Add vite config

* Move "public/index.html" to root folder

* Remove "%PUBLIC_URL%" occurrences

* Link "src/index.tsx" in "index.html"

* Update tsconfig target to "esnext"

* Target latest LTS node version (v18.16.0)

* Add "@types/node" dependency
This commit is contained in:
schroda
2023-06-05 00:58:21 +02:00
committed by GitHub
parent fa614a19d2
commit bc99728dcd
6 changed files with 310 additions and 6972 deletions

21
vite.config.ts Normal file
View File

@@ -0,0 +1,21 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import viteTsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig(() => ({
build: {
outDir: 'build',
},
server: {
port: 3000,
},
plugins: [react(), viteTsconfigPaths()],
}));