Skip to content
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

Actually compile the library before publishing #397

Closed
micimize opened this issue May 28, 2018 · 5 comments
Closed

Actually compile the library before publishing #397

micimize opened this issue May 28, 2018 · 5 comments

Comments

@micimize
Copy link

Current behaviour

Build systems that don't have flow (e.g. typescript) can't consume this module

Expected behaviour

module should be consumable as vanilla js, and perhaps have additional shadow .js.flow files alongside the distribution

@micimize
Copy link
Author

Just to clarify, I don't think this is urgent or blocking. Anyone using webpack can add this to their rules:

  {
      test: /\.js$/,
      enforce: "pre",
      use: [ "remove-flow-types-loader" ],
      include: nodeModule('react-native-paper')
  }

@rosswaycaster
Copy link

I am trying to use this with React Native Web and it keeps failing with You may need an appropriate loader to handle this file type.

I can't figure out how to make it work.

@micimize
Copy link
Author

micimize commented Jun 9, 2018

@rosswaycaster you're using the remove-flow-types-loader config above before your other webpack rules? nodeModule above looks like

const path = require('path')
const fs = require('fs')
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath)
const nodeModule = mod => resolveApp(`node_modules/${mod}`)

@github-actions
Copy link

Hello 👋, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

@louiechristie
Copy link
Contributor

louiechristie commented Dec 23, 2019

Apparently this issue is no longer relevant

#799 (comment)

because they switched to typescript from version 3

https://github.com/callstack/react-native-paper/releases/tag/v3.0.0

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

No branches or pull requests

4 participants