Skip to content

Commit

Permalink
feat: add initial RSC support (#6646)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang committed Jul 4, 2023
1 parent f1c4b24 commit 6a5078f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .babelrc.js
@@ -1,7 +1,8 @@
module.exports = api => {
module.exports = (api) => {
const env = api.env();

let dev = false;
let setUseClient = false;
let modules;

switch (env) {
Expand All @@ -12,12 +13,17 @@ module.exports = api => {
modules = false;
break;
case 'dist-prod':
modules = false;
break;
case 'esm':
modules = false;
setUseClient = true;
break;
case 'cjs':
default:
modules = 'commonjs';
setUseClient = true;
break;
}

return {
Expand All @@ -28,6 +34,8 @@ module.exports = api => {
dev,
modules,
removePropTypes: !dev,
setUseClient,
customClientImports: ['useBootstrapPrefix', 'createWithBsPrefix'],
},
],
'@babel/preset-typescript',
Expand Down

0 comments on commit 6a5078f

Please sign in to comment.