-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
Webpack reports "the request of a dependency is an expression" (SSR, Server-Side only) #234
Comments
I am trying to reduce the code in our SSR "branch" right now. I figured when I remove the following import: |
The error is server-side only and is gone when removing the ChunkExtractor import. Probably the issue is somehow related to: #181 |
Please note: We bundle all app-code on client+server with Webpack. The only excluded package right now is |
It seems like going back to |
I think your issue is a webpack one, you do: |
Actually your assumption is not true. We do not use a single dynamic import. All static imports based on plain strings. So closing this report might be a little too early. |
The Webpack reporting is true as it seems. It mentions the problem inside the loadable code. As I tried to explain: changing back the require code to eval fixes the issue for us. |
@swernerx OK sorry, I got it, yeah we need to change it to eval. |
🐛 Bug Report
Webpack v4 reports the following issue when executed:
The code involved in loadable looks like this:
The error seems to happen in the last line.
We do not have any dynamic imports in the whole application. All of our code is using simple strings right now.
Interestingly, beside the critical warning we cannot see any negative side effect. The application seems to work correctly.
I tried to figure out where this
__non_webpack_require__
is coming from. Seems like it is a convention introduced by Webpack. Maybe there is some error in the combination of Babel/Webpack plugins we use.Earlier in our development this error was not there. It seems it was introduced by some updates to the dependencies. Right now we have the following versions installed:
To Reproduce
Steps to reproduce the behavior:
I am not sure. Seems to be related to SSR, Webpack and Loadable.
Expected behavior
That the error/warning is gone.
Link to repl or repo (highly encouraged)
Please provide a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: