Why broweser tracker npm module size is larger than sp.js

So, I am trying to replace sp.js with browser tracking npm module. I am creating seperate tracker file with tracking modules + plugins and bundling it with webpack.

Size of the tracker file ~329KB while sp.js is ~72KB

Why there is a difference in size considering most of the plugins are available in sp.js as well.

Hey @ankit0404, can you please provide us with a codesandbox or similar with the code and tooling you used to create the bundle ?

Thanks Peter for the reply, I found the issue, I was using lodash and it got bundled as well. I have fixed it

2 Likes