peacejj
peacejj
盆友们 你们大家有解决嘛???怎么解决的
@liuxingbaoyu demo has been added above, you can directly execute will see the error
@liuxingbaoyu thanks 👍 solution: const tmp = t.functionDeclaration(t.identifier('Qunar'),[],t.blockStatement([])); astPath.scope.removeBinding('Qunar'); astPath.replaceWith(tmp);
> 在用Taro时也遇到这个问题,看了下,编译之后没有把mini-html-parser的依赖包events复制到dist/npm目录下,导致缺少依赖。。。 看命令行报错时因为Taro.build的时候没有找到events这个包。 > > **方法一** > 最后在config/index.js下增加配置就可以打包成功 > `{ copy: { patterns: [ { from: 'node_modules/events/', to: 'dist/events/' }, ] } }` > > **方法二** > 。。。抽空fork了项目,然后打了个npm包,所有依赖都打进去一个js里面,不介意可以用这个 > npm...
应该不是原生的问题,而是onload时,我在taro页onload里取也是undefined
进一步排查后,发现只有页面会这样,页面引用的组件还是对应源码