autobrr/web
KaiserBh 92646dacc8
build(web): bump vite and cjs node api refactor (#1276)
* refactor: use ES module.

To maintain compatibility with vite 6 and since that's where the web are heading too.
Also moved some deps to devDeps, better optimized production builds. Changed some of the script command to match how others run or preview it, I think it was still using CRA.

* chore: update-lock.yaml

* refactor: since we are using ESM now, .cjs .ts required.

Changed the file extensions and refactored the .eslintrc.cjs I think there was a lot of bloat from the previous version and removed most of them and keep it simple for now, we can always expand from here a clean slate.

* refactor: added .node.json and refactored.

* fix(build): APIClient.ts had few error.

ESLint: Unexpected lexical declaration in case block.(no-case-declarations)

and TS2554: Expected  0-1  arguments, but got  2
we passed the cause to the constructor which it only takes 1 argument so removed it instead, since it's already in the string "Offline".

* fix(build): import never used.

* fix(build): add the types for react-dom/client.

* fix(build): use ESNext instead.

* fix(build): hmm why are we missing the types for the import?

Added @types/react-table.

* chore(lint): fix lint warnings

Don't use * for export.

* chore(lint): missing deps.

React Hook useEffect has a missing dependency: 'validateForm'. Either include it or remove the dependency array

* chore(lint): fix import.

* chore(lint): fix import.

* chore(lint): fix react hook.

error  React Hook "useMutation" is called conditionally. React Hooks must be called in the exact same order in every component render  react-hooks/rules-of-hooks

* chore(lint): value never used.

  52:10  error    '_regexPattern' is assigned a value but never used

* chore(lint): add missing dependency to useEffect

* chore(lint): fix imports.

* chore(lint): add deps to array.

* chore(lint): error  Unexpected lexical declaration in case block  no-case-declarations

* chore(lint): remove any and add types.

I am not sure about type CompleteFilterType I know it's being used for JSON so might need to use any?? dunno just test it and see if works.

* chore(lint): react-hooks/exhaustive-deps

* chore(lint): react-hooks/exhaustive-deps

* chore(lint): use type guard instead of any.

* chore(lint): react-hooks/exhaustive-deps

* Revert "chore(lint): remove any and add types."

This reverts commit 7b9168fe7826d63cb00e44df8e15fbde49b59174.

* chore(web): ignore sourcemap warnings

* chore(web): update vite to 5.0.4

* chore: add the new script `pnpm dev` to start the dev env.

* chore: add the curly braces.

more info: https://eslint.org/docs/latest/rules/no-case-declarations

* chore: remove the extra spaces

* chore: remove the extra spaces

* chore: add the curly braces.

* chore: add curly braces

* remove text-shadow property and comment

* revert switch case braces for Actions.tsx

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-12-15 23:36:16 +01:00
..
dist refactor(web): migrate create-react-app to vite (#823) 2023-04-10 14:28:24 +02:00
public fix(web): Inter font (#1133) 2023-09-22 18:37:56 +02:00
src build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
.eslintrc.cjs build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
.gitignore refactor(web): migrate create-react-app to vite (#823) 2023-04-10 14:28:24 +02:00
build.go fix(web): PWA asset and route handling (#898) 2023-05-02 19:06:53 +02:00
index.html fix(web): Inter font (#1133) 2023-09-22 18:37:56 +02:00
package.json build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
pnpm-lock.yaml build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
postcss.config.cjs build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
README.md build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
tailwind.config.ts build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
tsconfig.json build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
tsconfig.node.json build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00
vite.config.ts build(web): bump vite and cjs node api refactor (#1276) 2023-12-15 23:36:16 +01:00

web

This project uses React built with Vite.

Available Scripts

In the project directory, you can run:

pnpm dev

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

pnpm run build

Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Learn More

To learn React, check out the React documentation.