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: add paths to module for require to work with node_modules #60

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

RobinCsl
Copy link
Contributor

@RobinCsl RobinCsl commented Oct 25, 2022

This was otherwise preventing the usage of require('my-npm-package') in Eleventy JavaScript render templates.

A working example: https://github.com/RobinCsl/11ty-webc-img-demo/tree/rcsl/use-require/03-final

I didn't test what this might break or not as I'm not familiar with the codebase and cannot appreciate the consequences of these changes, other than it helps with my specific use-case!

Hope that's helpful!

This was otherwise preventing the usage of `require('my-npm-package')` in Elventy JavaScript render templates.
@zachleat zachleat added this to the Next Version milestone Oct 27, 2022
@zachleat
Copy link
Member

Yay! Thanks @RobinCsl!

@zachleat zachleat merged commit ea3b302 into 11ty:main Oct 27, 2022
zachleat added a commit that referenced this pull request Oct 27, 2022
@RobinCsl RobinCsl deleted the patch-1 branch October 28, 2022 12:08
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.

2 participants