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

fix lightning module resolution #1551

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

fix lightning module resolution #1551

wants to merge 4 commits into from

Conversation

huumn
Copy link
Member

@huumn huumn commented Nov 7, 2024

Description

This reverts the revert of #1521. It aims to fix the module resolution we're seeing when locating .proto files for lightning by locating them before webpack runs and storing them in an environment variable LIGHTNING_MODULE_PATH.

After spending most of the day trying to write my own version of nextjs's module resolution, I realized we were just using tsx weirdly by making modules of our own directories. Not doing that allows require.resolve to work in worker and avoid some of the weird tricks we used to deal with CJS deps in the worker.

I still need to test if this works in production, but it should because require.resolve - when not using webpack - returns an absolute path.

@huumn huumn requested a review from riccardobl November 7, 2024 02:42
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.

1 participant