autobrr/web/package.json
KaiserBh edae1bbf4b
refactor(web): migrate create-react-app to vite (#787)
* removed react-app type instead use vite.

* removed index.html from public since vite uses it from root: read more: https://vitejs.dev/guide/#index-html-and-project-root

* yarn.lock update.

* added vite config file. With commented rollUp option if we want the build to be called build but using default stuff for now.

* updated tsconfig to use vite and include vite.config.ts

* changed package json build commands to use vite.

* for some reason there is an error in vite config when we put project as tsconfig.json.

* build.go updated to use the new dist folder.

* refactored as well updated to use dist and web.AssetHandler again.

* Fixed issue forcing the frontend to be reloaded for all routes to work if logged in fresh without reloading it will always go back to dashboard.

* updated it to use the new function; need to fix the Index for baseUrl I believe, if enabled it works except logs route will crash due to cors.

* refactored and default port to 7474, don't think we need the rollUpOptions.

* added tmp/ to ignore .

* init air.toml, for dev hot reloading both app and backend. https://github.com/cosmtrek/air run it using air but make sure it's in PATH

* updated the start command to build and watch for changes, works great with air.

* revert

* added proxy for vite config. To be used for dev.

* refactor: I think this should fix it, when logs route etc getting accessed usually it throws error but by getting rid of the catch-all it should work as intended, since web.RegisterHandler(r) will catch the unmatched ones.

* fix: baseurl and build

* fix(build): docker ignore !web/dist

* fix(build): dockerignore add exclusions

* docs: update README.md

* build: update postcss config

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-07 16:04:10 +02:00

74 lines
2 KiB
JSON

{
"name": "web",
"version": "0.2.0",
"private": true,
"homepage": ".",
"overrides": {
"react": "$react"
},
"dependencies": {
"@fontsource/inter": "^4.5.11",
"@headlessui/react": "^1.6.4",
"@heroicons/react": "^2.0.11",
"@hookform/error-message": "^2.0.0",
"date-fns": "^2.28.0",
"formik": "^2.2.9",
"react": "^18.2.0",
"react-debounce-input": "^3.3.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-hook-form": "^7.32.1",
"react-hot-toast": "^2.2.0",
"react-multi-select-component": "^4.2.9",
"react-popper-tooltip": "^4.4.2",
"react-query": "^3.39.1",
"react-ridge-state": "4.2.2",
"react-router-dom": "^6.3.0",
"react-select": "^5.3.2",
"react-table": "^7.8.0",
"react-tooltip": "^5.5.2",
"stacktracey": "^2.1.8"
},
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"serve": "vite preview",
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx --color",
"lint:watch": "npm run lint -- --watch"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.2",
"@types/node": "^18.0.0",
"@types/react": "^18.0.12",
"@types/react-dom": "^18.0.5",
"@types/react-router-dom": "^5.1.7",
"@types/react-table": "^7.7.12",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@vitejs/plugin-react-swc": "^3.2.0",
"autoprefixer": "^10.4.7",
"eslint": "^8.17.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-watch": "^8.0.0",
"http-proxy-middleware": "^2.0.6",
"postcss": "^8.4.14",
"tailwindcss": "^3.1.3",
"typescript": "^4.7.3",
"vite": "^4.2.1"
},
"packageManager": "yarn@3.2.2"
}