-
-
Notifications
You must be signed in to change notification settings - Fork 257
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Version
System:
OS: Linux 6.9 Arch Linux
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memory: 10.94 GB / 19.29 GB
Container: Yes
Shell: 3.7.1 - /bin/fish
Browsers:
Chromium: 126.0.6478.126
npmPackages:
@rsbuild/core: 1.0.0-alpha.4 => 1.0.0-alpha.4
@rsbuild/plugin-react: 1.0.0-alpha.4 => 1.0.0-alpha.4Details
Using react-idle-timer in a react project causes SyntaxError:
vendors-node_modules…ack_c-32d00f.js:288
Uncaught SyntaxError: Unexpected token ';' (at vendors-node_modules…32d00f.js:288:21525)
Reproduce link
https://codesandbox.io/p/devbox/wqrg9x
Reproduce Steps
- Create a new react ts project using
pnpm create rsbuild@latest - Add 'react-idle-timer' as a dependency:
pnpm i react-idle-timer - Modify the App component to use idle timer:
import { withIdleTimer } from "react-idle-timer";
import './App.css';
const App = () => {
return (
<div className="content">
<h1>Rsbuild with React</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
);
};
export default withIdleTimer(App);- Run the dev server:
pnpm run dev - Observe the syntax error message in Chrome DevTools
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working