babel-plugin-essor 0.0.15-beta.5 → 0.0.15-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -605,9 +605,7 @@ var transformProgram = {
605
605
  exit: (path, state) => {
606
606
  const pluginState = path.state;
607
607
  const { imports, declarations, events } = pluginState;
608
- const insertIndex = path.node.body.findIndex(
609
- (node) => !import_core4.types.isImportDeclaration(node) && !import_core4.types.isExportDeclaration(node)
610
- );
608
+ const insertIndex = path.node.body.findIndex((node) => !import_core4.types.isImportDeclaration(node));
611
609
  if (declarations == null ? void 0 : declarations.length) {
612
610
  const templateDeclaration = import_core4.types.variableDeclaration("const", declarations);
613
611
  if (insertIndex !== -1) {