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 +1 -1
- package/src/webpack/loaderUtils.js +11 -2
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|