Skip to content
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

Change bundler from rollup to vite #489

Closed
8 tasks done
NicolasOmar opened this issue Nov 15, 2024 · 5 comments · Fixed by #491
Closed
8 tasks done

Change bundler from rollup to vite #489

NicolasOmar opened this issue Nov 15, 2024 · 5 comments · Fixed by #491
Assignees
Labels
dependencies Pull requests that update a dependency file enhancement UT, infrastructure, or any tool for a better lifecycle research Investigation about tech, methodology or other
Milestone

Comments

@NicolasOmar
Copy link
Owner

NicolasOmar commented Nov 15, 2024

Objective

Change the main bundler tool from rollup implementation to vite.


Description

After several failed attempts to update rollup plugin dependencies and checking that there are no solutions nowadays, I decided to review actual alternatives that will avoid this kind of situation in future releases and maintenance rounds.
The option I will review in this ticket is vite.


Tasks

  • Study Vite's bundler mode implementation.
  • Remove rollup's implementation.
  • Change build script to execute vite's.
  • Check that the new build script is working.
  • Check that the new lint script is working.
  • Check that the new test script is working.
  • Check that the new storybook build script is working.
  • Send this renewed method to the next minor version (v4.1.0).
@NicolasOmar NicolasOmar self-assigned this Nov 15, 2024
@NicolasOmar NicolasOmar converted this from a draft issue Nov 15, 2024
@NicolasOmar NicolasOmar added enhancement UT, infrastructure, or any tool for a better lifecycle research Investigation about tech, methodology or other dependencies Pull requests that update a dependency file labels Nov 15, 2024
@NicolasOmar NicolasOmar added this to the v5.0.0 milestone Nov 15, 2024
@NicolasOmar NicolasOmar moved this from In Analysis to In Progress in Reactive-bulma | Project board Nov 15, 2024
@NicolasOmar NicolasOmar linked a pull request Nov 17, 2024 that will close this issue
5 tasks
@NicolasOmar
Copy link
Owner Author

  • Original article, which I based to start working on the migration.
    • The first try on a clean and viable project worked without hassle.
    • Migrating the changes to reactive-bulma's project has been problematic due to a compatibility issue with vite-plugin-dts.
      • I will raise a ticket to the project's repo to get a solution or possible steps to solve it.
    • I will work on mounting the library in its current state (in my local), check if it works for the main scenarios, and proceed.

@NicolasOmar
Copy link
Owner Author

NicolasOmar commented Nov 18, 2024

New findings to be added as gattered knowledge:

  • A specific issue regarding vite implementation on the current project failed due to a vite-plugin-dts build error.
  • Then, I had a problem with my storybook build script at the pipeline level (it worked locally).
    • The solution was to uninstall all storybook-related dependencies, run the npx storybook@latest init command on the project, and adjust its configurations to mine.
  • Last but not least, my linter configuration started to break after I initiated this ticket. Appears to be a common issue that is being solved as I am writing this explanation.
    • The solution has been to update the related packages to v8.15.0 or above.

@receter
Copy link

receter commented Nov 20, 2024

The problem with ajv sounds familiar to me, I think I had the same problem at some point. How did you solve it? By installing ajv?

I had another problem a while back that I traced back to having legacy-peer-deps in my global npm configuration. I think the ajv problem might be related to that. Because with lecacy-peer-deps the peer dependencies have to be installed manually…

@receter
Copy link

receter commented Nov 20, 2024

Yes, I just tested it and this was because of --legacy-peer-deps which is also in your .npmrc. Do you still know why you need that?

@NicolasOmar
Copy link
Owner Author

Hi @receter, As you suggested, I deleted the .npmrc file and made a clean install on the repo, and it worked like a charm.
I will include this fix in my next version (around next week).

Thank you for the work and solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement UT, infrastructure, or any tool for a better lifecycle research Investigation about tech, methodology or other
Projects
Development

Successfully merging a pull request may close this issue.

2 participants