Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add babel-plugin-transform-import-meta plugin in test environment only
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