banhfun
banhfun

Reputation: 297

Which directory(s) does Babel look for plugins?

The obvious answer would be that Babel searches for plugins in node_modules with a babel-plugin prefix, but are there any other directories that it searches in? If not, is it possible to configure Babel to look through other directories?

Upvotes: 0

Views: 67

Answers (1)

Traveling Tech Guy
Traveling Tech Guy

Reputation: 27811

You can specify a relative or absolute path to plugins in your .babelrc file (or however you pass settings to babel).

"plugins": ["./node_modules/asdf/plugin"]

See this explanation.

Upvotes: 2

Related Questions