refactor(拆分utils部分):#3390
Conversation
|
@qixing-jk is attempting to deploy a commit to the tangly1024's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
重构虽然繁琐但很必要!你开了一个好头! 我的思路主要是:(分支提交代码只改动了domUtils.js文件)
这种目录结构可以进一步扩展,比如新建 common、node 等目录分别存放通用工具和Node环境特定工具。环境检查机制也可以应用于其他需要特定环境运行的函数。 |
其实主要还是代码分割的问题,现有的webpack过程,当浏览器或者middleware引入的函数中含有node依赖时会出现依赖报错问题。 |
|
Closing as stale: branch has merge conflicts with current main and no updates in months. Please rebase onto main and reopen when ready to continue. |
已知问题
解决方案
不过不知道如何在文件结构等方式上,实现有效避免node和browser函数的混用问题,有特殊环境依赖的JS放在特定命名的文件夹中嘛?
测试确认