-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(prepare): 过滤仅仅 js 文件进行解析 #10861
fix(prepare): 过滤仅仅 js 文件进行解析 #10861
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Size Change: +661 B (0%) Total Size: 9.84 MB
ℹ️ View Unchanged
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #10861 +/- ##
=======================================
Coverage 29.29% 29.30%
=======================================
Files 470 471 +1
Lines 14213 14217 +4
Branches 3347 3347
=======================================
+ Hits 4164 4166 +2
- Misses 9337 9339 +2
Partials 712 712
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -9,12 +7,13 @@ export const AUTO_CSS_MODULE_EXTS = [ | |||
'.styl', | |||
]; | |||
|
|||
const STYLE_EXT_REGX = /\.(:?css|less|scss|sass|stylus|styl)$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
虽然提高了性能,但也提高了阅读成本,可能不少人不清楚 :?
的用法。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同时增加了一个成本是,需要同时在两个地方维护这份 extnam 的列表。
esbuild 的 meta.inputs 会包含 json 文件,未来可能当有其他类型文件;解析前过滤 js 文件。
顺手优化 isStyleFile