plugin-react 1.0.6 triggers sourcemap and deoptimisation error/warning messages in dev server #5438
Closed
Description
Describe the bug
In a Vite+React project using version 1.0.6 of plugin-react
, running yarn run vite serve
and then accessing the server triggers a bunch of the following error messages:
Sourcemap for "/Users/luc/Code/myproj/node_modules/.vite/react-dom.js" points to missing source files
Sourcemap for "/Users/luc/Code/myproj/node_modules/.vite/react.js" points to missing source files
Sourcemap for "/Users/luc/Code/myprojvite/react-router-dom.js" points to missing source files
(... and more)
Reproduction
yarn create vite --template react test
cd test
yarn install
yarn run vite serve --open
This will trigger the following messages for me, when doing this in my Desktop
folder:
[BABEL] Note: The code generator has deoptimised the styling of /Users/luc/Desktop/test/node_modules/.vite/react-dom.js?v=5ffcdbe8 as it exceeds the max of 500KB.
Sourcemap for "/Users/luc/Desktop/test/node_modules/.vite/react.js" points to missing source files
Sourcemap for "/Users/luc/Desktop/test/node_modules/.vite/react_jsx-dev-runtime.js" points to missing source files
Sourcemap for "/Users/luc/Desktop/test/node_modules/.vite/react-dom.js" points to missing source files
Forcing use of version 1.0.5 of plugin-react "fixes" the error messages:
yarn add --dev @vitejs/plugin-react@1.0.5
System Info
System:
OS: macOS 12.0.1
CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Memory: 1015.09 MB / 32.00 GB
Shell: 3.3.1 - /usr/local/bin/fish
Binaries:
Node: 17.0.1 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 95.0.4638.54
Firefox: 93.0
Firefox Developer Edition: 90.0
Safari: 15.1
Safari Technology Preview: 15.4
npmPackages:
@vitejs/plugin-react: ^1.0.0 => 1.0.6
vite: ^2.6.4 => 2.6.12
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.