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

Get Remix to work with local webpack. #4679

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Conversation

seanparsons
Copy link
Contributor

Problem:
When loading any project using Remix in the editor with local webpack building the editor, you get a big error about env not being defined on undefined.

Cause:
In a function remixLiveReloadConnect there's some logic that checks process.env.REMIX_DEV_ORIGIN which webpack turns into undefined.env.REMIX_DEV_ORIGIN which fails for fairly obvious reasons.

Fix:
This provides a value for the specific case of process.env.REMIX_DEV_ORIGIN.

Commit Details:

  • Assigns a value to process.env.REMIX_DEV_ORIGIN.

- Assigns a value to `process.env.REMIX_DEV_ORIGIN`.
Copy link
Contributor

github-actions bot commented Jan 3, 2024

Try me

Copy link

relativeci bot commented Jan 3, 2024

Job #9684: Bundle Size — 62.18MiB (~-0.01%).

f7b48c4(current) vs df0030c master#9679(baseline)

Warning

Bundle contains 66 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
Job #9684
     Baseline
Job #9679
Improvement  Initial JS 45.39MiB(~-0.01%) 45.39MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 27.06% 19.85%
No change  Chunks 26 26
No change  Assets 30 30
No change  Modules 4361 4361
No change  Duplicate Modules 470 470
No change  Duplicate Code 30.75% 30.75%
No change  Packages 462 462
No change  Duplicate Packages 65 65
Bundle size by type  Change 1 change Improvement 1 improvement
                 Current
Job #9684
     Baseline
Job #9679
Improvement  JS 62.17MiB (~-0.01%) 62.17MiB
Not changed  HTML 11.53KiB 11.53KiB

View job #9684 reportView fix/remix-local-webpack branch activity

editor/webpack.config.js Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jan 3, 2024

Performance test results:
(Chart1)
(Chart2)

@seanparsons seanparsons merged commit 98193b0 into master Jan 4, 2024
13 checks passed
@seanparsons seanparsons deleted the fix/remix-local-webpack branch January 4, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants