Skip to content

Added "require" to exports for react-native-web imports to compile #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jkoutavas
Copy link

@jkoutavas jkoutavas commented Mar 15, 2025

Description

Lovely package. I had to add this simple one-liner to it in order to use it from a React-Native-Web (RNW) application I'm working on. I probably would have gotten by with just using npx patch-package react-timezone-select but patch-package is ignoring my change to package.json

Linked Issues

Didn't create one, just went and requested this change.

Additional context

A bit of context, my vanilla RNW tsconfig.json file:

{
  "extends": "@react-native/typescript-config/tsconfig.json",
  "exclude": ["node_modules"],
  "compilerOptions": {
    "typeRoots": ["./src/types"],
    "isolatedModules": false,
    "allowImportingTsExtensions": false,
    "paths": {
      "react": ["./node_modules/@types/react"],
      "@shared/*": ["../shared/*"]
    },
    "lib": ["es6", "dom"] // ✅ Ensures TypeScript recognizes `document`
  }
}

If you need more context, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant