premailex icon indicating copy to clipboard operation
premailex copied to clipboard

Fix `struct Meeseeks.Error is undefined` when meeseeks deps is missing

Open agatheblues opened this issue 4 months ago • 0 comments

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.

agatheblues avatar Aug 06 '25 09:08 agatheblues