DhiWise / dhiwise-nodejs

DhiWise Node.js API generator allows you to instantly generate secure REST APIs. Just supply your database schema to DhiWise, and a fully documented CRUD APIs will be ready for consumption in a few simple clicks. The generated code is clean, scalable, and customizable.
https://dhiwise.com
Apache License 2.0
312 stars 87 forks source link

feat: added vite remove react-scripts 4.0 #35

Closed yaldram closed 1 year ago

yaldram commented 2 years ago
yaldram commented 2 years ago

A Break down of all the steps I followed -

// https://vitejs.dev/config/ export default defineConfig({ build: { outDir: 'build', }, server: { open: true, }, plugins: [react(), vitePluginRequire()], });


- Similarly under `packages/client` create `index.html` and paste the following - 
```html
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <link rel="icon" href="/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="theme-color" content="#000000" />
  <meta name="description" content="Web site created using create-react-app" />
  <link rel="manifest" href="/manifest.json" />

  <title>DhiWise</title>
</head>

<body>
  <div id="root" class="dhiwise_body"></div>
  <script type="module" src="/src/index.jsx"></script>
</body>

</html>

function Loader() { return (

loader

); }

const BuildProcess = lazy(() => import('../container/common')); const TechnologySetStep = lazy(() => import('../container/Shared/TechnologySetStep'));

const PlatFormConfiguration = lazy(() => import('../container/CRUD/Configuration')); const Modal = lazy(() => import('../container/CRUD/Modal')); const ModelRoleAccess = lazy(() => import('../container/RoleAccess')); const Dashboard = lazy(() => import('../container/Dashboard')); const ModelPermission = lazy(() => import('../container/CRUD/Permission')); const NodeConstant = lazy(() => import('../container/Constant')); const Policy = lazy(() => import('../container/Policy')); const Routes = lazy(() => import('../container/CRUD/Routes')); const NodeEnvironment = lazy(() => import('../container/EnvironmentVariable')); const Configuration = lazy(() => import('../container/Configuration'));

const App = () => { document.getElementsByTagName('html')[0].classList.add('theme-black');

return ( <Suspense fallback={}>

{/* project & application */} {/* Nodejs */} {/* CRUD */}
Not Found
} />
</Suspense>

); }; export default App;


- Now from the project root run - npm run start the browser will open.

- Now navigate to the client folder - cd packages/client and run npm run build and serve the build like so - npx server ./build
yaldram commented 2 years ago

@ravisojitra Please run a complete regression Q/A testing on the build if there are any config issues let me know, if there are any styling issues you can easily fix them

yaldram commented 2 years ago

@ravisojitra please take care of the linting from your end.

yaldram commented 1 year ago

@ravisojitra hey any update on this Pull Request ?

ravisojitra commented 1 year ago

@yaldram we are testing it from our end in local system.

yaldram commented 1 year ago

Hey @ravisojitra any update on this. Is everything working as expected ? Can I know the progress on this please ?

saloni137 commented 1 year ago

Hey @ravisojitra any update on this. Is everything working as expected ? Can I know the progress on this please ?

@yaldram Not working as expected

yaldram commented 1 year ago

Hey @saloni137 what is not working can you please highlight the issues here. Thanks

saloni137 commented 1 year ago
  1. fonts are not proper.
  2. build is failing.
  3. dropdown design also looks changed.
  4. eslint check is failing.
yaldram commented 1 year ago

@saloni137

  1. yarn build is running fine for me, the project is building on my PC.
  2. Yeah there might be small style related issues. You can fix them easily given that you are familiar with the code.
  3. For eslint as I said in my previous comments you might need to fix the errors. There are no eslint errros in the code, there are some dependencies issues which the team can resolve.

The final call is for the dhiwise team if you think it is feasible like go ahead let me know if you need my help. Thanks

saloni137 commented 1 year ago

@yaldram The build I am talking about is that When I create and configure a node app and create the build - that is not working

yaldram commented 1 year ago

Thanks for the update @saloni137, I might be missing something, but I did try to build a node app it worked, I was able to also open it successfully in VS code. Maybe I am missing something.

saloni137 commented 1 year ago

Let me check in the backend and get back to you.

saloni137 commented 1 year ago

Found the backend issue, not from your side. I will update the other issues and merge them into the master branch. Can you update PR to merge with any branch other than the master? So that I will be easily able to work on it. @yaldram

yaldram commented 1 year ago

Hey @saloni137 thanks for the update. I would say you can merge the code into master and then maybe I would take a pull of the latest master code with your fixes. I did not get you on the other than master thing. Do you want me to change the base of this pull request? If yes which branch, should I target. Thanks

saloni137 commented 1 year ago

The Master branch is up-to-date. You can take a pull from it. And then you can submit a PR for https://github.com/DhiWise/dhiwise-nodejs/tree/fix/vite-update if that is ok.

saloni137 commented 1 year ago

needs more improvements

yaldram commented 1 year ago

@saloni137 for the eslint error here are some points -

  1. we see an error @babel/preset-react not found that is because under packages/client/.eslintrc.json we are using this package on line no. 19 and we don't have it in the package.json. Try installing this package, might help.
udhayamgit commented 1 year ago

Issue still Exists , Today I took new clone and still Mouse is not working

aderchox commented 1 year ago

The final merge was from master into feat, so this PR has still not been merged really into the master?!

yaldram commented 1 year ago

Yeah @aderchox I worked on this Pull Request, so that I could contribute to this awesome project, but unfortunately the team at Dhiwise has not given due attention to this Pull Request. I know the team might be busy in doing other important tasks, but it's been 2 months now. cc - @saloni137 @ravisojitra

saloni137 commented 1 year ago

Hi @yaldram, We have not ignored your PR. We checked it, and we found the following issues.

  1. Design changes
  2. Can't run it as mono-repo in the higher version on nodejs
  3. Eslint issues.

We are not resolving these issues by ourselves because we have planned to move this repo from lerna to turborepo and turbopack instead of vite. Thank you.

yaldram commented 1 year ago

Hey @saloni137 great to hear that all the best :)