Skip to content

Commit

Permalink
fix: add regenerate-unicode-properties to dynamicRequireTargets
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Feb 19, 2021
1 parent 3af936f commit 6f2dd16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ function buildRollup(packages, targetBrowsers) {
"packages/babel-compat-data/*.js",
"packages/*/src/**/*.cjs",
],
dynamicRequireTargets: [
// https://github.com/mathiasbynens/regexpu-core/blob/ffd8fff2e31f4597f6fdfee75d5ac1c5c8111ec3/rewrite-pattern.js#L48
"node_modules/regenerate-unicode-properties/**",
],
}),
rollupBabel({
envName: babelEnvName,
Expand Down
7 changes: 7 additions & 0 deletions packages/babel-standalone/test/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@
}),
).not.toThrow();
});
it("#12815 - unicode property letter short alias should be transformed", () => {
expect(() =>
Babel.transform("/\\p{L}/u", {
plugins: ["proposal-unicode-property-regex"],
}),
).not.toThrow();
});
});
},
);

0 comments on commit 6f2dd16

Please sign in to comment.