Skip to content

Commit

Permalink
feat([publish]): allow configuring react preset
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Jun 14, 2024
1 parent 6c79858 commit 2790dea
Show file tree
Hide file tree
Showing 2 changed files with 8,071 additions and 5,685 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = function preset(api, opts) {
const angularSupport = opts.angular || false;
const typeScript = opts.typeScript || false;
const corejs = opts.corejs || '2';
const reactConfig = opts.react;

const envConfig = {
useBuiltIns,
Expand All @@ -25,7 +26,7 @@ module.exports = function preset(api, opts) {

return {
presets: [
require('@babel/preset-react'),
[require('@babel/preset-react'), reactConfig],
[require('@babel/preset-env'), envConfig],
typeScript
? [require('@babel/preset-typescript'), {allowDeclareFields: true}]
Expand Down
Loading

0 comments on commit 2790dea

Please sign in to comment.