Can I disable a plugin for a specific directory?

I have a generator plugin which finds Typescript files and compiles them into Javascript. It works fine. However, I also have some Typescript files which don’t compile — they’re intended to be served statically instead.

Is there a better way to disable the plugin for that specific directory than what I’m doing at the moment, which is adding next if sf.path.include?(directoryName) in its inner loop? Such as a per-directory config file telling Jekyll not to call that specific plugin?