Skip to content

Commit 061e923

Browse files
author
sunfutao
committed
docs: 提取css思路
1 parent 5440696 commit 061e923

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/loader.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* 思路:通过创建子编译器来实现将 CSS 文件从 JavaScript 中提取出来
3+
*
4+
* 插件可以通过监听 Webpack 的事件钩子,在适当的时机创建子编译器,并为其指定相应的入口文件和配置。
5+
* 通过这种方式,插件可以自定义代码的拆分和生成,实现更高级的代码分离策略和优化
6+
*/
17
const path = require("path");
28

39
const {

0 commit comments

Comments
 (0)