mobx-devtools
mobx-devtools copied to clipboard
Upgrade to Webpack 5 (or Vite, or something else for local playgrounds)
In https://github.com/mobxjs/mobx-devtools/pull/115 and https://github.com/mobxjs/mobx-devtools/pull/116, we upgraded Node and chromedriver, which breaks older versions of Webpack.
We have monkey patched the hashing function, but it would be preferable to update the Webpack config to a modern version.
I'm also open to Vite, which I personally have used for browser extensions before and like a lot. Open to other suggestions or PRs!
Hey @grvv - are you interested in working on this as a follow up to https://github.com/mobxjs/mobx-devtools/pull/121 and https://github.com/mobxjs/mobx-devtools/pull/122? I'd be happy to either let you take it on, work on it together, or I can just pick it up myself if you won't have time in the next couple of weeks.
Overall, the goal is to be able to package up the source code into a browser extension. I think it's simplest to keep targeting Manifest v2 and save the v3 migration for a separate step. But I can see a scenario where that work is too interlinked to separate.
As far as the Webpack/Vite upgrade goes, I think there are three options:
- Step up one major version at a time in separate commits or PRs, following the migration path directions from Webpack.
- Jump all the way to Webpack 5 in one go and just rewrite all the configurations to be compatible.
- We could also migrate entirely away from Webpack and use Vite instead. I've had a lot of success with this browser extension boilerplate in my day job, and they use Vite for extensions.
I don't have a strong opinion yet, I think whatever gets us to a modern bundler (Webpack 5 or Vite) and preserves the current build scripts/playground tests is a good thing to aim for.
@coolsoftwaretyler Yeah, I can definitely take this one. Let’s sync up and make a plan on how we want to approach it. A walkthrough of the repo and any future plans would be super helpful, as it’ll guide me in making more informed technical decisions.
As for the bundler, I’ve had good experiences with both Webpack and Vite, but I also think RSpack could be a viable option to explore, as it’s designed to be a drop-in replacement for Webpack. If we go with Vite, we’ll need to consider migrating the test setup as well, which might add some overhead. I’m happy to explore any of these options and see what fits best for the project.
Let’s aim for whatever gets us to a modern setup (whether Webpack 5, Vite, or RSpack) while keeping the current build scripts and playground tests intact.
Awesome. I have heard of RSpack and would be excited to try it.
I'll send you an email today and we can chat more in depth. Thanks!
here we go:
https://github.com/mobxjs/mobx-devtools/pull/127
Phenomenal. Closed with #127