@imgcook/cli-loader-images
Advanced tools
Comparing version 0.0.2 to 0.0.3-alpha.0
@@ -66,2 +66,9 @@ const fs = require('fs'); | ||
newImgUrl = udata.url; | ||
} else if ( | ||
option.moduleData && | ||
option.moduleData.dsl === 'react-taobao-standard' | ||
) { | ||
// 如果在 react 标准下引用本地路径图片,使用 require 引用 | ||
const regex = new RegExp(`"${imgArr[idx]}"`, 'g'); | ||
fileValue = fileValue.replace(regex, `require('./images/${imgName}')`); | ||
} else { | ||
@@ -90,4 +97,4 @@ fileValue = fileValue.replace(reg, `./images/${imgName}`); | ||
module.exports = function(item, option) { | ||
module.exports = function (item, option) { | ||
return loader(item, option); | ||
}; |
{ | ||
"name": "@imgcook/cli-loader-images", | ||
"version": "0.0.2", | ||
"version": "0.0.3-alpha.0", | ||
"description": "", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "d690d58b284d76e8d24cfdcb44fd33320d29884e" | ||
"gitHead": "49aaa4a028afd44f3acedf8ff926cdbba44ead23" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5560
151