router: after upgrade router-plugin to v1.121.22, cannot compile successfully project based on the file-based routing with Rspack or Rsbuild
Which project does this relate to?
Router
Describe the bug
before (compile successfully): @tanstack/react-router: 1.116.0 @tanstack/router-plugin: 1.116.1 @rsbuild/core: 1.1.8
after: @tanstack/react-router: 1.121.21 @tanstack/router-plugin: 1.121.22 @rsbuild/core: 1.1.8
error:
error Compile error:
Failed to compile, check the errors for troubleshooting.
× Error: [html-rspack-plugin]: Child compilation failed:
│ × Module parse failed:
│ ╰─▶ × JavaScript parsing error: Expression expected
│ ╭─[1:0]
│ 1 │ <!DOCTYPE html>
│ · ─
│ 2 │ <!--
│ 3 │ NOTE: This HTML file is a template. If you open it directly in the browser,
│ ╰────
│
│ help:
│ File was processed with these loaders:
│ * checkoutroot/node_modules/@rsbuild/core/compiled/html-rspack-plugin/loader.js
│ * checkoutroot/node_modules/unplugin/dist/rspack/loaders/transform.js??tanstack-router:hmr
│ You may need an additional loader to handle the result of these loaders.
Your Example Website or App
reproduce demo
Steps to Reproduce the Bug or Issue
see description
Expected behavior
please see description
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 18 (8 by maintainers)
Commits related to this issue
- fix: add id filter to transform to avoid matching .html on rspack/webpack (#4483) fixes #4481 fixes #4456 — committed to SimenB/tanstack-router by schiller-manuel a year ago
It’s okay, at least I’m unblocked with both a production and dev build, thanks for investigating.
Can anyone else confirm the issue? @tcdw @qiuzhangxi77
If anybody runs into this issue, this is my current fix:
@schiller-manuel