You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在具体的业务需求中,我们希望通过自动注入的形式,在小程序的页面注入埋点代码。
于是乎采用了webpack loader 获取source后通过babel解析,将埋点代码注入后,返回generate后的新代码。
但实际,编译后并未采用我们想要的代码,也许这个方案本身就有问题。
loader中获取source,并处理返回, 这里假设直接返回一个新的字串:
实际上,渲染的仍为原有页面。有兄弟知道我该怎么做吗?感激不尽~
Beta Was this translation helpful? Give feedback.
All reactions