akfun 3.2.15 → 3.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "3.2.15",
3
+ "version": "3.2.16",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
@@ -39,9 +39,18 @@ exports.cssLoaders = function (options) {
39
39
  // url: false, // enables/disables url()/image-set() functions handling
40
40
  url: {
41
41
  filter: (url, resourcePath) => {
42
- // 自定义配置优先
43
- if (options.cssLoaderUrl !== undefined) {
42
+ if (url.startsWith('data:')) {
43
+ // 不处理 css 中的 bas64 url
44
+ return false;
45
+ } else if (options.cssLoaderUrlDir && resourcePath.includes(options.cssLoaderUrlDir)) {
46
+ // 指定处理某类路径下的中相关 css 文件中的 url
47
+ return true;
48
+ } else if (options.cssLoaderUrl !== undefined) {
49
+ // cssLoaderUrl 为true 则不处理 css 中的 url
44
50
  return options.cssLoaderUrl;
51
+ } else if (resourcePath.includes('node_modules')) {
52
+ // 默认不处理 node_modules 中相关 css 文件中的 url
53
+ return false;
45
54
  }
46
55
  return true;
47
56
  }