From 8f7d0b0338131b1ac9ecb4b919afae320b434e8b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 10 Nov 2021 09:15:15 -0800 Subject: [PATCH] [Fix] properly build `module.exports` Fixes #824. See https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/819#issuecomment-965557153 --- .babelrc | 5 ++++- package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.babelrc b/.babelrc index 2159bf6ef..42e95b05b 100644 --- a/.babelrc +++ b/.babelrc @@ -9,5 +9,8 @@ } ] ], - "plugins": ["@babel/plugin-transform-flow-strip-types"] + "plugins": [ + "@babel/plugin-transform-flow-strip-types", + "add-module-exports" + ] } diff --git a/package.json b/package.json index 6e7d7e5bc..6e60ad671 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@babel/plugin-transform-flow-strip-types": "^7.16.0", "aud": "^1.1.5", "babel-jest": "^24.9.0", + "babel-plugin-add-module-exports": "^1.0.4", "babel-preset-airbnb": "^5.0.0", "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8", "eslint-config-airbnb-base": "^15.0.0",