你的提案是否与问题有关?
升级到react脚本5后,npm start现在每次都有这些丑陋的日志
assets by status 3.38 KiB [cached] 1 asset
assets by chunk 8.92 MiB (name: main)
asset static/js/bundle.js 8.91 MiB [emitted] (name: main) 1 related asset
asset main.61ec10f63a1c61f3f0e3.hot-update.js 10.2 KiB [emitted] [immutable] [hmr] (name: main) 1 related asset
assets by path *.json 431 bytes
asset asset-manifest.json 403 bytes [emitted]
asset main.61ec10f63a1c61f3f0e3.hot-update.json 28 bytes [emitted] [immutable] [hmr]
asset index.html 1.69 KiB [emitted]
入口点main 8.92 MiB (8.64 MiB) = static/js/bundle.js 8.91 MiB main.61ec10f63a1c61f3f0e3.hot-update.js 10.2 KiB 3 auxiliary assets
缓存模块8.43 MiB [cached] 1092模块
运行时模块28.3 KiB 14模块
它们以前不在版本中,我不在乎webpack或babel,
另外当出现错误时,我会得到这个
ERROR in ./src/Components/HomePage/HomePage.js 7:0-51
Module not found: Error: Can't resolve './HomeasdsadPage.module.scss' in 'C:\Users...................-frontend\src\Components\HomePage'
resolve './HomeasdsadPage.module.scss' in 'C:\Users............-frontend\src\Components\HomePage'
using description file: C:\Users....................package.json (relative path: ./src/Components/HomePage)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users............-frontend\package.json (relative path: ./src/Components/HomePage/HomeasdsadPage.module.scss)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:Users............-frontend\src\Components\HomePage\HomeasdsadPage.module.scss doesn't exist
.web.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users............-frontend\src\Components\HomePage\HomeasdsadPage.module.scss.web.mjs doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users............-frontend\srcComponents\HomePage\HomeasdsadPage.module.scss.mjs doesn't exist
.web.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users......-----------------frontendsrc\Components\HomePageHomeasdsadPage.module.scss.web.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:Users......-----------------frontend\src\Components\HomePage\HomeasdsadPage.module.scss.js doesn't exist
.web.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users......-----------------frontend\src\ComponentsHomePage\HomeasdsadPage.module.scss.web.ts doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users......-----------------frontend\srcComponents\HomePage\HomeasdsadPage.module.scss.ts doesn't exist
.web.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users......-----------------frontend\src\Components\HomePage\HomeasdsadPage.module.scss.web.tsx doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users......-----------------frontend\src\Components\HomePage\HomeasdsadPage
1条答案
按热度按时间weylhg0b1#
已经在这儿讨论过了 - #11871