Merge pull request #6778 from loganfsmyth/use-peerdep
Use the peerDep to load types/template/traverse in plugins
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { basename, extname } from "path";
|
||||
import template from "@babel/template";
|
||||
import {
|
||||
isModule,
|
||||
rewriteModuleStatementsAndPrepareHeader,
|
||||
@@ -9,6 +8,7 @@ import {
|
||||
ensureStatementsHoisted,
|
||||
wrapInterop,
|
||||
} from "@babel/helper-module-transforms";
|
||||
import { types as t, template } from "@babel/core";
|
||||
|
||||
const buildPrerequisiteAssignment = template(`
|
||||
GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}
|
||||
@@ -30,7 +30,7 @@ const buildWrapper = template(`
|
||||
})
|
||||
`);
|
||||
|
||||
export default function({ types: t }, options) {
|
||||
export default function(api, options) {
|
||||
const {
|
||||
globals,
|
||||
exactGlobals,
|
||||
|
||||
Reference in New Issue
Block a user