Skip to content

after upgrade router-plugin to v1.121.22, cannot compile successfully project based on the file-based routing with Rspack or Rsbuild #4456

Open
@qiuzhangxi77

Description

@qiuzhangxi77

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

''

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions