Open mrceperka opened 1 week ago
Can you try to create a minimum repro repo
@JSerFeng I am not at the moment. I've tried with the repro repo but it was working as expected. But I haven't installed all the plugins and dependencies my original repo has.
Is there some command that could help you debug? I think I could run that in private repo and give you output.
Same issue here. I can provide an internal repro. It works when using Rspack 1.0.0-alpha.0
but does not work when using Rspack 1.0.0-alpha.1
.
try 1.0.0-alpha.2
@JSerFeng it won't even start now :(
NODE_ENV=development HMR=1 rspack dev -c webpack/rspack.app.config.js
/var/docker/frontend_v2/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /var/docker/frontend_v2/node_modules/string-width/index.js from /var/docker/frontend_v2/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /var/docker/frontend_v2/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/yargs/build/index.cjs:1:60039)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/yargs/index.cjs:5:30)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/dist/cli.js:35:33)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/dist/bootstrap.js:4:15)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/bin/rspack:2:16) {
code: 'ERR_REQUIRE_ESM'
Same problem for alpha.1 as well. Only alpha.0 works for me right now.
Error [ERR_REQUIRE_ESM]: require() of ES Module
This is not issue with rspack, can you solve it and then continue trying 1.0.0-alpha.2
@JSerFeng maybe it's not directly, but why 1.0.0-alpha.0 works and 1.0.0-aplha.2 not? It looks like some rspack dependencies were updated and now the build is broken. When I downgrade to alpha.0 its able to run.
I think it's because some dependencies are unexpectedly hoist, can you try using pnpm
@JSerFeng thanks for the tip. Will try. I am using yarn v1 and it was working so far (I mean with alpha.0)
System Info
Details
When running in dev mode (
rspack dev
)optimization.moduleIds="deterministic"
causes errors likeundefined factory 19218
I have had hmr and hot mode also enabled.
When changed to
moduleIds: isDev ? "named" : "deterministic"
it works.Reproduce link
No response
Reproduce Steps
optimization.moduleIds="deterministic
rspack dev
with hmr