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

webpack-hot-server-middleware on demand loading bug #424

Open
ygs-code opened this issue Jul 30, 2022 · 0 comments
Open

webpack-hot-server-middleware on demand loading bug #424

ygs-code opened this issue Jul 30, 2022 · 0 comments

Comments

@ygs-code
Copy link

  • Operating System: windos
  • Node Version: v16.15.1
  • NPM Version: 8.7.0
  • webpack Version: "4.46.0",
  • ${package} Version:

Expected Behavior

Actual Behavior

Code

  // webpack.config.js
  // If your bitchin' code blocks are over 20 lines, please paste a link to a gist
  // (https://gist.github.com).
  // additional code, HEY YO remove this block if you don't need it

How Do We Reproduce?

React-loadable and /webpack-hot-middleware make errors when they are used together
Error: Cannot find module './static/js/0.js'
Require stack:

  • K:\react-loading-ssr\dist\server\static\js\main.js
  • K:\react-loading-ssr\node_modules\webpack-hot-server-middleware\src\index.js
  • K:\react-loading-ssr\server\middleware\webpackHot\index.js
  • K:\react-loading-ssr\server\middleware\index.js

React-loadable is packaged on demand with other JS besides main.js, and main.js gets an error when referencing other JS。
Can you help me see what the problem is?
My project address is https://github.com/qq281113270/react-loading-ssr
in webpack-middleware 。
Install dependencies

  npm i 

start a project

npm  run  ssr:dev:middleware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant