Skip to content

fix: add paths to module for require to work with node_modules#60

Merged
zachleat merged 1 commit into
11ty:mainfrom
RobinCsl:patch-1
Oct 27, 2022
Merged

fix: add paths to module for require to work with node_modules#60
zachleat merged 1 commit into
11ty:mainfrom
RobinCsl:patch-1

Conversation

@RobinCsl

@RobinCsl RobinCsl commented Oct 25, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants