-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: 将@celljs/cli-common中使用了ts-node
的地方,改为使用importx-tsup包进行动态require #211
#212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看看这些问题
return obj.default; | ||
} else if (typeof obj === 'object' && typeof obj.default === 'function') { | ||
return obj; | ||
} else {return obj; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else {return obj; } 不建议放成一行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{return obj; } 缺少空格 { return obj; }
由于使用了importx,目前尝试完善一个vitesse模版。目前大概完善了50%左右:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看看
return obj.default; | ||
} else if (typeof obj === 'object' && typeof obj.default === 'function') { | ||
return obj; | ||
} else return obj; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else return obj; 改成如下:
} else {
return obj;
}
examples/vitesse-app/package.json
Outdated
}, | ||
"devDependencies": { | ||
"@celljs/cli": "3.0.0", | ||
"@celljs/cli-service": "3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@celljs/cli-service": "3.0.0",
这个依赖可以不用添加
没毛病 |
ts-node
的地方,改为使用importx-tsup包进行动态requirets-node
的地方,改为使用importx-tsup包进行动态require #211
本来想直接使用
importx
的,发现importx
没有提供CommonJS
产物,于是我便自己fork了一份importx,移除掉unbuild
改为使用tsup
编译出CommonJS
产物,发包到了npm:importx-tsup。@muxiangqiu 您也可以去改一份发npm,要不然importx无法在celljs中正常使用。现在这个版本是没问题的,可以直接执行
yarn workspace @celljs/example-backend-app start
进行测试,控制台能完美打印出webpack-hook
字样。