umi: [Bug] mfsu breaks source map
What happens?
There are warning about source maps when turn on mfsu. And lots of node_modules packages cannot be mapped.
DevTools failed to load source map: Could not parse content for http://localhost:8000/react-router.js.map: Unexpected token < in JSON at position 0
DevTools failed to load source map: Could not parse content for http://localhost:8000/index.js.map: Unexpected token < in JSON at position 0
DevTools failed to load source map: Could not parse content for http://localhost:8000/react-router-config.js.map: Unexpected token < in JSON at position 0

Mini Showcase Repository(REQUIRED)
Please provide a repository using
yarn create @umijs/umi-appthen upload to your GitHub 请提供一个可复现的仓库,使用yarn create @umijs/umi-app创建,并上传到你的 GitHub 仓库
https://github.com/cagen/umi-test
How To Reproduce
Steps to reproduce the behavior:
- npx @umijs/create-umi-app
- add
mfsu: {}in .umirc.ts - npm start
- open chrome devtools to see the warnings
Expected behavior There should not be any source maps warnings, and node_modules packages can be mapped correctly.
Context
- Umi Version:3.5.18
- Node Version:12.22.1
- Platform:macOS
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 19
Have the same problem
同样的问题 按照AntdPro官网初始化的项目,结果出现了这个问题 1.npx create-umi xxx 2.? Select the boilerplate type (Use arrow keys) -> ant-design-pro 3.? 🤓 Which language do you want to use? (Use arrow keys) -> JavaScript 4. ? 🚀 Do you need all the blocks or a simple scaffold? (Use arrow keys) -> simple 5. cd xxx && npm install 6. npm run start 环境 nodejs12 macOS