callstack / callstack/haul

Some libraries from node_modules (or every) do not compiled by babel

Open
#707 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.7k
Forks
185
PR merge metrics
No merged PRs in 30d

Description

## Environment
"@haul-bundler/babel-preset-react-native": "^0.16.0",
"@haul-bundler/preset-0.60": "^0.17.0",
"@haul-bundler/cli": "^0.17.0",
"@haul-bundler/core": "^0.17.0",
"react": "16.9.0",
"react-native": "0.61.5",

## Description
Looks like haul babel presset ignores node_modules, but some libraries which need to be compiled,like rn-viewpager.

Bundle crashes on class static property, which works fine if i write that right in my App.tsx.
![image](https://user-images.githubusercontent.com/24633723/75520794-6f85aa80-5a17-11ea-87f6-40fe8691174f.png)

Maybe it is a not an issue, cause i understand that not every node_module should be compiled,
but what should i do in this case? (except choosing another lib)

## To reproduce
1) react-native init
2) yarn add haul -> init -> start
--empty project works fine--
3) yarn add rn-viewpager
4) add minimal code
```
import { IndicatorViewPager, PagerDotIndicator } from 'rn-viewpager';

const App = () => (
<>

)}
>
TEST
TEST
TEST


);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.