syntax-tree / hast-util-sanitize

utility to sanitize hast nodes
https://unifiedjs.com
MIT License
49 stars 20 forks source link

Webpack support #3

Closed cloverich closed 8 years ago

cloverich commented 8 years ago

Hey:

I"m webpacking remark and a few friends and ran into the following error in a file importing remark-html:

ERROR in ./~/hast-util-sanitize/lib/index.js                                                                                       
Module not found: Error: Cannot resolve 'file' or 'directory' ./github in /Users/cloverich/Projects/chronicles/node_modules/hast-ut
 @ ./~/hast-util-sanitize/lib/index.js 15:15-34  

I traced it here; I have json-loader set-up in my webpack config but it would only accept this if I made the filetype explicit. I researched a bit but could not figure out if this was canonical / intentional or not -- so please accept my apologies if this is misplaced. I considered opening an issue but figured this was the same effort.

Very much enjoying remark and its related projects!

wooorm commented 8 years ago

Thanks, but this is a duplicate, already discussed before (the linked comment shows how you can fix this in your codebase)

cloverich commented 8 years ago

Ah nuts, I checked the closed issues but not the closed PR's -- and now I continue the problem. Sorry!

wooorm commented 8 years ago

@cloverich No problem ;)