diff --git a/src/babel/transformation/file/index.js b/src/babel/transformation/file/index.js index bd0d9a22d5..94c92d9117 100644 --- a/src/babel/transformation/file/index.js +++ b/src/babel/transformation/file/index.js @@ -243,7 +243,7 @@ export default class File { if (name) { if (typeof name === "object" && name.transformer) { plugin = name.transformer; - position ||= name.position; + position = name.position || position; } else if (typeof name === "string") { // this is a plugin in the form of "foobar" or "foobar:after" // where the optional colon is the delimiter for plugin position in the transformer stack