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

Bundles generated on Windows and Linux are different #75

Closed
pastelmind opened this issue Jun 25, 2021 · 0 comments · Fixed by #77
Closed

Bundles generated on Windows and Linux are different #75

pastelmind opened this issue Jun 25, 2021 · 0 comments · Fixed by #77
Labels
type: maintenance Project maintenance stuff

Comments

@pastelmind
Copy link
Contributor

pastelmind commented Jun 25, 2021

Bundles for Philter Manager (the new one) are different on Windows and Linux. I discovered this while attempting to process #62 -- the bundles built by @midgleyc (on WSL) were different from the ones I built on my machine (Windows). If I build the bundles on Ubuntu 20.04 (WSL 2, Windows 10), the bundles were the same.

After a few days of puzzling and experimentation, I tracked this down to a Vite problem. When I disabled build.minify, Vite would produce differently named variables on Windows and Linux.

On Windows:

var C__Users_Phil_Documents_GitHub_viteReproJs_node_modules_react = { exports: {} };

On Linux:

var react = { exports: {} };

I suspect this is what causes the (minified) bundles to be different on Windows and Linux as well.

I am pretty sure this is a Vite problem, not a Rollup problem. In fact, Vite has several issues that appear to be related to this:

What can we do?

Edit: This is fixed by #77

Until this is solved, I'll have to move to WSL for generating bundles.

  • [ ] Add info in CONTRIBUTING.md (We should add this first)
  • [ ] Rebuild bundle in WSL
@pastelmind pastelmind added the type: maintenance Project maintenance stuff label Jun 25, 2021
pastelmind added a commit that referenced this issue Aug 23, 2021
Notes:

- Update Vite to 2.5.0, which fixes a bug that caused absolute paths of
  dependencies to leak into the bundle (and the sourcemap). This was
  discovered in pull request #62, investigated further in issue #75, and
  then remedied via monkeypatching Vite in PR #77.
  Now that Vite has fixed the bug, we can remove the monkeypatch.
  (`patch-package` is still needed to work with `react-virtualized`)
pastelmind added a commit that referenced this issue Aug 23, 2021
Notes:

- Update Vite to 2.5.0, which fixes a bug that caused absolute paths of
  dependencies to leak into the bundle (and the sourcemap). This was
  discovered in pull request #62, investigated further in issue #75, and
  then remedied via monkeypatching Vite in PR #77.
  Now that Vite has fixed the bug, we can remove the monkeypatch.
  (`patch-package` is still needed to work with `react-virtualized`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance Project maintenance stuff
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant