Move plugin processing to top of plugins (#6381)
* centralize plugin options * Centralize plugins options - move more options to the top - move validations that depend on options to the top * use isLoose option * Move more validations to the top * Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top * fix eslint errors * remove unused parameter * set default systemGlobal value * Revert "Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top" This reverts commit b3855302d17fa19d8acb4c8accab3680c8d2710e. * Revert "Move more validations to the top" This reverts commit e5861d8a034ff8f553391f55654f753bcf428a5d. * fix allowMutablePropsOnTags option usage * improve naming * change Contructor definition for sake of consistency * move allowMutablePropsOnTags validation to the top * add missing !
This commit is contained in:
committed by
Logan Smyth
parent
d89063bb32
commit
fcdfc61bdb
@@ -22,7 +22,8 @@ const buildExportAll = template(`
|
||||
|
||||
const TYPE_IMPORT = "Import";
|
||||
|
||||
export default function({ types: t }) {
|
||||
export default function({ types: t }, options) {
|
||||
const { systemGlobal = "System" } = options;
|
||||
const IGNORE_REASSIGNMENT_SYMBOL = Symbol();
|
||||
|
||||
const reassignmentVisitor = {
|
||||
@@ -359,7 +360,7 @@ export default function({ types: t }) {
|
||||
path.node.body = [
|
||||
buildTemplate({
|
||||
SYSTEM_REGISTER: t.memberExpression(
|
||||
t.identifier(state.opts.systemGlobal || "System"),
|
||||
t.identifier(systemGlobal),
|
||||
t.identifier("register"),
|
||||
),
|
||||
BEFORE_BODY: beforeBody,
|
||||
|
||||
Reference in New Issue
Block a user