-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bug Report: parcel watch errors when building a react library #7652
Comments
devongovett
pushed a commit
that referenced
this issue
Apr 7, 2022
For library targets: - Skips applying refresh transforms in JSTransformer - Skips applying ReactRefreshRuntime - Skips applying transforms in ReactRefreshWrapTransformer - Adds test asserting that runtime and transforms are not applied Fixes #7359, #7496, #7652, #7900 See also: #6892 Co-authored-by: Niklas Mischkulnig <[email protected]>
#7914 should resolve this. |
@lettertwo is there a way to reference this version of parcel without waiting for a release? |
@e-krebs Yes, use |
@mischnic perfect, it works 🙂 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 bug report
when building a library that contains react component, parcel works with the
build
command line, butwatch
outputs an error:also reported here: #7495
🎛 Configuration (.babelrc, package.json, cli command)
no babel config when the bug happens.
Full repro described here: https://github.com/e-krebs/parcel-react-library
important parts of the
package.json
looks like:and then, the
src/index.ts
file exports a React component from another file.🤔 Expected Behavior
parcel watch
should not output an error but work (same asparcel build
works, actually).😯 Current Behavior
parcel watch
outputs an error (error message on Windows below, but the same happen on linux):💁 Possible Solution
a workaround is to use babel (see Code Sample below), but:
🔦 Context
Just building a library that contains react components. It is for internal use, but it could be a public design system library for example.
💻 Code Sample
https://github.com/e-krebs/parcel-react-library
🌍 Your Environment
The text was updated successfully, but these errors were encountered: