Resolve 'babel-plugin-' name before the plain name
Otherwise you get situations like the following: `plugins: [ 'object-assign']` resolves the module `object-assign` (an Object.assign polyfill) instead of the intended babel plugin: babel-plugin-object-assign.
This commit is contained in:
parent
e9eced846f
commit
9b3c8569f7
@ -35,7 +35,7 @@ export default class PluginManager {
|
||||
var match = name.match(/^(.*?):(after|before)$/);
|
||||
if (match) [, name, position] = match;
|
||||
|
||||
var loc = util.resolveRelative(name) || util.resolveRelative(`babel-plugin-${name}`);
|
||||
var loc = util.resolveRelative(`babel-plugin-${name}`) || util.resolveRelative(name);
|
||||
if (loc) {
|
||||
return {
|
||||
position: position,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user