Closed yashha closed 1 year ago
Hi @yashha, thanks for logging this issue. You’re right that looking into node_modules
is not the way to go because it doesn’t work when percollate
is installed as a dependency. And your solution for addressing this is fine, but I feel like this should be fixed in (or with the help of) Hyphenopoly’s loading API.
I’ll open a discussion there.
As of version 5.3.0 of Hyphenopoly the loader
/loaderSync
- function is now called with a second argument receiving import.meta.url
.
See https://mnater.github.io/Hyphenopoly/Module.html
I hope this helps with loading the patterns (I haven't tested with percolate myself).
Please feel free to reopen the issue, if not.
Kind regards, Mathias
Thank you @mnater, we will test it out and let you know. Cheers!
@danburzo Updated the PR, looks better now.
Brilliant, thanks @yashha!
Deployed in percollate@4.0.4
Environment
node --version
: v18.16.1npm --version
: 9.5.1yarn --version
, if using Yarn: 1.22.21percollate --version
: 4.0.3Description
When using percollate programmatically with hyphanation, the patterns can't be loaded dynamically.
It throws following error: