-
Notifications
You must be signed in to change notification settings - Fork 10
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
chore/issue 557 resolve node modules using node require resolve #674
chore/issue 557 resolve node modules using node require resolve #674
Conversation
5c9d315
to
8b40245
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might hold this back for the next release instead of going out with theme packs and 0.15.0 just to avoid too many big changes happening at once? Will see.
Made another issue to evaluate pushing this idea forward more if it indeed does workout. 🙌 |
b168641
to
78ae84b
Compare
I wonder if this means we can remove all the setup work on our specs now that requires copy / pasting files out of root node_modules into the test cases directory? 🤔 edit: maybe for the files in node_modules, but I still think it's needed for at least package.json for Greenwood to build up the initial import map? I guess experimenting to test would be OK, but maybe that kind of refactoring can be saved for later? May be merge this and then alpha to validate? |
78ae84b
to
30b5e19
Compare
Related Issue
resolves #557
Summary of Changes
require.resolve
instead of assuming where node_modules is located on disk (in an effort to better handle npx commands showing error for not found node modules paths #505 / Bug/issue 505 improve default npx support #511 type situations)require.resolve
blows up like happened for our theme pack specs (should see if I can mock this better or make an issue / discussion)Was able to confirm things seem to be working as expected now that we are using
require.resolve
in thenpx
test case by changing the content to say<h2>hello require.resolve</h2>
TODO
npx
test case to not require unpkg fallback and / or figure out a way to test locally@scoped-packages/something/else
- reached out in NodeJS slack, will see, but I think it would definitely be an edge casewalkModule
? - maybe for another PR / discussion