Use peerDep rather than plugin param for common APIs.

This commit is contained in:
Logan Smyth
2017-10-31 15:00:13 -07:00
parent 7dbed2170e
commit b19b66d94b
79 changed files with 141 additions and 115 deletions

View File

@@ -6,8 +6,7 @@
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"@babel/helper-module-transforms": "7.0.0-beta.31",
"@babel/template": "7.0.0-beta.31"
"@babel/helper-module-transforms": "7.0.0-beta.31"
},
"keywords": [
"babel-plugin"

View File

@@ -1,4 +1,3 @@
import template from "@babel/template";
import {
isModule,
rewriteModuleStatementsAndPrepareHeader,
@@ -8,13 +7,14 @@ import {
ensureStatementsHoisted,
wrapInterop,
} from "@babel/helper-module-transforms";
import { template, types as t } from "@babel/core";
const buildWrapper = template(`
define(MODULE_NAME, AMD_ARGUMENTS, function(IMPORT_NAMES) {
})
`);
export default function({ types: t }, options) {
export default function(api, options) {
const { loose, allowTopLevelThis, strict, strictMode, noInterop } = options;
return {
visitor: {