增加namespaces文件夹识别
This commit is contained in:
parent
5084f6da41
commit
a0adb18bba
|
|
@ -109,7 +109,7 @@ module.exports = (babel) => {
|
||||||
// this.props.t/this.t/t
|
// this.props.t/this.t/t
|
||||||
// 处理策略为给第二个参数中加上'#oakNameSpace, #oakModule两个参数,告知t模块此文件相应的位置,再加以处理寻找
|
// 处理策略为给第二个参数中加上'#oakNameSpace, #oakModule两个参数,告知t模块此文件相应的位置,再加以处理寻找
|
||||||
if (
|
if (
|
||||||
/(pages|components)[\w|\W]+(.tsx|.ts|.jsx|.js)$/.test(res)
|
/(pages|components|namespaces)[\w|\W]+(.tsx|.ts|.jsx|.js)$/.test(res)
|
||||||
) {
|
) {
|
||||||
const { node } = path;
|
const { node } = path;
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function isOakNamespaceIdentifier(node, name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Regex =
|
const Regex =
|
||||||
/([\\/]*[a-zA-Z0-9_-\w\W]|[\\/]*[a-zA-Z0-9_-\w\W]:)*[\\/](lib|src|es)[\\/](pages|components)+[\\/]/;
|
/([\\/]*[a-zA-Z0-9_-\w\W]|[\\/]*[a-zA-Z0-9_-\w\W]:)*[\\/](lib|src|es)[\\/](pages|components|namespaces)+[\\/]/;
|
||||||
|
|
||||||
module.exports = (babel) => {
|
module.exports = (babel) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue