框架架构改变之后的编译变化
This commit is contained in:
parent
2a882e8361
commit
513af7316d
|
|
@ -173,7 +173,7 @@ module.exports = (babel) => {
|
|||
const { cwd, filename } = state;
|
||||
const resolvePath = resolve(cwd, filename).replace(/\\/g, '/');
|
||||
const { node, parent } = path;
|
||||
if (node.name === 'OakPage' && /pages[\w|\W]+index\.(ts|js)$/.test(resolvePath)) {
|
||||
if (node.name === 'OakComponent' && /pages[\w|\W]+index\.(ts|js)$/.test(resolvePath)) {
|
||||
const regexStr = resolvePath.replace(Regex, '/');
|
||||
const relativePath = regexStr.slice(0, regexStr.length - 9);
|
||||
assert(t.isCallExpression(parent));
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ module.exports = {
|
|||
appRootPath: resolveRoot('.'),
|
||||
oakConfigJson: resolveApp('src/oak.config.json'),
|
||||
oakGeneralBusinessAppPath: resolveRoot(
|
||||
'node_modules/oak-general-business/lib'
|
||||
'node_modules/oak-general-business/src'
|
||||
),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue