-
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
docs: provide an example of adding a custom file loader configuration #12180
Conversation
… in webpack-chain
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12180 +/- ##
==========================================
- Coverage 28.48% 28.47% -0.01%
==========================================
Files 492 492
Lines 15119 15123 +4
Branches 3601 3605 +4
==========================================
Hits 4306 4306
- Misses 10041 10047 +6
+ Partials 772 770 -2 ☔ View full report in Codecov by Sentry. |
.type('javascript/auto') // 添加此行配置 | ||
.use('abc-loader') | ||
.loader('abc-loader') | ||
.end(); |
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.
这样并不好,因为你的文件并不一定就是 js 相关的,可能是一些自定义格式或者 wasm 或 css 等相关的,直接在 asset 规则里排除你要处理的文件正则就行了,参考:wasm 配置 方法。
建议把这里的说明和示例改成配置自定义 loader + 去掉 asset 里的命中的形式。
Co-authored-by: Peach <[email protected]>
Co-authored-by: Peach <[email protected]>
关于自定义 loader ,可以参考下 #12222 。 |
provide an example of adding a custom file loader configuration in chainwebpack