Created
April 2, 2022 15:57
-
-
Save cmlenz/da2b8b9aa959d24b2d300a8a04a23727 to your computer and use it in GitHub Desktop.
Add babel-plugin-transform-import-meta plugin in test environment only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const test = process.env.NODE_ENV === 'test'; | |
module.exports = { | |
plugins: [ | |
...(test ? ['babel-plugin-transform-import-meta'] : []) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment