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鈥檒l 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 <4586894+mischnic@users.noreply.github.com>
#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: