premailex
premailex copied to clipboard
Fix `struct Meeseeks.Error is undefined` when meeseeks deps is missing
When opting to use the floki html parser dependency, and not listing meeseeks in a project using premailex, the following warning comes up:
==> premailex
Compiling 10 files (.ex)
warning: struct Meeseeks.Error is undefined (module Meeseeks.Error is not available or is yet to be defined)
│
33 │ e in Meeseeks.Error ->
│ ~
│
└─ lib/premailex/html_parser/meeseeks.ex:33:7: Premailex.HTMLParser.Meeseeks.all/2
Since the dependency meeseeks is optional, we can wrap the module with ensure_loaded to remove this warning.