expo / expo/snack

The runtime does not package the babel helpers while snackager uses runtime-transform

Open
#299 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
510
Forks
178
Avg merge
5h 7m
Merged PRs (30d)
5

Description

### Summary

My module exports a `main` and a `module` with the `module` using ES6 syntax which makes Babel to insert a couple of helpers:

```shell
yarn bundle @mmomtchev/react-native-settings@1.0.3 | ./node_modules/.bin/bunyan
```
```js
file: /tmp/@mmomtchev/react-native-settings/web-bundle.js
--
externals: [
"@babel/runtime/helpers/interopRequireDefault",
"@babel/runtime/helpers/slicedToArray",
"@react-navigation/native-stack",
"react",
"react-native"
]
```

### What platform(s) does this occur on?

Web

### SDK Version

v44.0.0

### Reproducible demo or steps to reproduce from a blank project

https://snack.expo.dev/@mmomtchev/@mmomtchev-react-native-settings

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the provided Snack demo and run the `yarn bundle` command from the report. Inspect `/tmp/@mmomtchev/react-native-settings/web-bundle.js` and its listed externals, then trace the `runtime-transform` packaging path; done means the Babel runtime helpers are packaged instead of left as unresolved externals.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel
Domain
build-system, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.