Skip to content

Commit

Permalink
fix: bring back @babel/env preset match (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet authored Sep 2, 2020
1 parent ffcc9d9 commit 7b2ff57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/babel-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const createConfigItems = (babel, type, items) => {
};

const environmentPreset = '@babel/preset-env';
const presetEnvRegex = new RegExp(environmentPreset);
// capture both @babel/env & @babel/preset-env (https://babeljs.io/docs/en/presets#preset-shorthand)
const presetEnvRegex = new RegExp(/@babel\/(preset-)?env/);

export default () => {
return createBabelInputPluginFactory(babelCore => {
Expand Down

0 comments on commit 7b2ff57

Please sign in to comment.