nirsky / react-native-size-matters

A lightweight, zero-dependencies, React-Native utility belt for scaling the size of your apps UI across different sized devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App breaks if importing from " /extend" with latest react-native-dotenv module

MartinZAtanasov opened this issue · comments

This case results in error message: module fs does not exist in the haste module map react native
Latest react-native-dotenv version requires to be imported differently.

_// old import of dotenv
import { SIZE_MATTERS_BASE_WIDTH, SIZE_MATTERS_BASE_HEIGHT } from 'react-native-dotenv'

_// new import of dotenv
import { SIZE_MATTERS_BASE_WIDTH, SIZE_MATTERS_BASE_HEIGHT } from '@env'

Thanks. Didn't realize the API changed.
Will fix it soon.

I tried to fix it in PR #55

Thanks @p4kaidu, your PR was merged.
Released a new version - v0.4.0 with the lastest changes.