-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize stack and convert to vue+vite #68
Conversation
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
3d09eb2
to
030edef
Compare
…the same name." Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
9ea86fb
to
ac970d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @davidglezz
I will try to review this PR in next days, it's a big one 😄
Really old libraries were used, Webpack 1 and a lot of loaders. Due to the breaking changes of new versions of webpack and loaders, it would take me more time than just starting a vue project and migrating a dozen components.
I agree 👍 code is so old we can simply say we start over from an almost blank page.
Question: don't you think that even Vue or Vite are over-engineered for this site?
When I look at the result I feel like we could almost do it in vanilla JS and using only Bootstrap 😄 . And render the site on server side once, and serve it as static HTML files instead of computing the end result into browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs to run Node 20 to be tested
wow @davidglezz ! |
Thanks |
Before I can test this PR I need to install Node.js 20 on my laptop without breaking my stack 😅 might take a few time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what a PR !
how do we proceed, I guess it should not be tested by QA ?
(@matks if you have nvm installed, you can change node version without breaking anything 👍 )
Probably yes, a bit, Vue is mainly used as template engine and is the easiest path (for me) to migrate from old react codebase. Converting to framework-less will require more effort IMO. |
I see other issues:
|
Oh yeah there are a loooooot of issues with this repository 😛 |
|
And here we go 😄 troubleshooting brew updates EDIT: argh 😭 so many deps to update |
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
For the record I broke my php + node setup on my laptop 😛 when trying to install Node 20. This is because of https://www.skymac.org/Admin-Dev/article-5038c427-Homebrew-Corriger-un-probleme-de-dependances-trop-recentes.htm I think I will reinstall my laptop from zero 😄 too many piles of software on it and now it all crumbled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @davidglezz so today I did the full reinstall of my environment 😄 it's all clean and shiny now! I also installed nvm
to be able to easily switch Node versions.
I attempted to test your PR but I have this issue: when I browse front/index.html
I get console error
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "video/mp2t". Strict MIME type checking is enforced for module scripts per HTML spec.
Here is what I did:
- Fetch your branch
cd front
npm install
using npm 10.1.0npm run build
using node 20.8.1- Browse index.html
@matks I'm glad you renewed the node setup successfully. You can do And thank you very much for taking the time to review my PR. |
There are things that are a bit ugly, but that's because I did this in a few hours, I didn't want to spend more time doing some refactoring or improvements without being sure that I'm on the right track and knowing that it could be merge. Feel free to request any changes or ask me anything you want. Have a nice day =) |
I did It works on my machine 🎉 so I think code is "good enough" for now 😄 . This PR is already big, improvements should be done in other PRs. Now how do we plug this into existing GitHub Action pipeline and test it? What we could do is create a new branch on this repository, a branch |
I think it's great! |
Branch |
Env configured 325ec08 |
Let's see if it works #70 |
Everything looks good -> #71 PR to deploy it to prod If OK for you @davidglezz then tomorrow we can deploy in production |
Perfect! |
@davidglezz Your changes are live. If you're motivated, there are warnings & notices in the logs https://github.com/PrestaShop/TopTranslators/actions/runs/6571132956/job/17849715207#step:12:1 |
Why change to Vite and Vue instead of fixing the dependency problem that existed?
Really old libraries were used, Webpack 1 and a lot of loaders. Due to the breaking changes of new versions of webpack and loaders, it would take me more time than just starting a vue project and migrating a dozen components.