-
Notifications
You must be signed in to change notification settings - Fork 44
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
importComponent not working #758
Comments
Hey @tjwelde, thanks for taking the time to report the issue. Can you please show an example how you use I just tried it in a minimal example and could not reproduce the issue. |
Can you please also post the output of:
Thanks! |
In Page we render |
Output from
|
we also have a custom mixin for sass support |
It appears you have two versions of webpack installed Depending on how you've installed the Can you please ensure you have only one webpack version installed and try again? |
Unfortunately that didn't solve the issue either. But the dependencies look much better :)
|
I tried to reproduce the issue based on your code snippets but unfortunately wasn't able to. Can you please try to create a minimal repository where this bug is reproducible, because there is a lot of unknowns here, like
thanks! |
Ok, will try to recreate. |
Ok, after stripping the project completely down, similar to the output of
and in the file, where we want to import Home, we do it like this: So we actually import
This indirect import causes our issues. We can circumvent it for now, by using the complete path. |
Unfortunately we can't rally circumvent it, since other projects also use reexporting and will break. E.g. |
Thanks for digging into it. We'll have a look. Considering the holidays (which I hope you'll enjoy dearly) it could take a bit for a fix to land. We'll keep you updated. |
Yes, this was also my last deed for this year. I wish you a merry christmas and a happy new year. |
This *should* resolve xing/hops#758 The initial code was based on https://github.com/jamiebuilds/react-loadable/blob/master/src/webpack.js#L18-L20 Co-authored-by: ZauberNerd <bjoernjohannes@gmail.com>
This *should* resolve xing/hops#758 The initial code was based on https://github.com/jamiebuilds/react-loadable/blob/master/src/webpack.js#L18-L20 Co-authored-by: Björn Brauer <bjoernjohannes@gmail.com>
It seems to be an issue related to untool/react. The package iterates over a
It seems to be a known webpack semi-issue, in relation to which Webpack's maintainer suggested to use an alternative way to identify generated modules. Skipping invalid entries seems to fix the issue (but I couldn't guarantee about possible side-effects 😃). |
This *should* resolve xing/hops#758 The initial code was based on https://github.com/jamiebuilds/react-loadable/blob/master/src/webpack.js#L18-L20 Co-authored-by: Björn Brauer <bjoernjohannes@gmail.com>
@tjwelde Hey, sorry for the premature closing of that issue, there was too much Github magic going on. 😅 We just released |
Thanks a lot guys, works nicely. |
This is my intent (choose one)
The problem
Hi,
we just updated from rc27 to 11.0.1 and we really like the update. It also comes at the right time, because we wanted to introduce dynamic imports.
Unfortunately the production build is not working, when using
importComponent
.The log says:
In the method
determineAssets
in@untool/react/lib/render.js
I loggedmoduleFileMap:
and modules:
[ 'PW+f', 'PW+f' ]
Proposed solution
I think the last element in the
moduleFileMap
object is suspicious, since its key isnull
.The text was updated successfully, but these errors were encountered: