Skip to content

Commit

Permalink
Update babel-preset to include 'platform' option
Browse files Browse the repository at this point in the history
Passing the 'platform' to the babel-preset will ensure the correct
plugins are used. By default, the platform is 'web'.

Also updates stylex to 0.9.3
  • Loading branch information
necolas committed Dec 20, 2024
1 parent 27f0198 commit eb9cd7b
Show file tree
Hide file tree
Showing 11 changed files with 230 additions and 501 deletions.
9 changes: 4 additions & 5 deletions apps/examples/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ module.exports = function (api) {
const platform = api.caller(getPlatform);
const dev = api.caller(getIsDev);

const presets = ['babel-preset-expo'];
const plugins = [];

if (platform === 'web') {
presets.push([reactStrictPreset, { debug: true, dev, rootDir: __dirname }]);
}
const presets = [
'babel-preset-expo',
[reactStrictPreset, { debug: true, dev, platform }]
];

return {
plugins,
Expand Down
190 changes: 105 additions & 85 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb9cd7b

Please sign in to comment.