Making sense of v2.js source map error in Google Lighthouse

theAndreyK
Contributor | Partner

Is it possible to add a source map to the standard HubSpot v2.js file? I believe it automatically gets included in a form module—I don't add it directly. 

 

When I run Google Lighthouse it throws an error: 

Screen Shot 2021-09-09 at 5.02.09 PM.png

It's a bit unclear but it looks like forms/v2.js needs a source map and there is an additional file missing a souce map but the layout doesn't make it clear if the two messages relate. 

 

Any ideas? 

 

I'm considering using the forms API to avoid loading v2.js but that feels like overkill. 

 

Thanks!

0 Upvotes
5 Replies 5
webdew
Top Contributor | Diamond Partner

Hi @theAndreyK ,

You can use the link field and add the document link. The link field has many default features also. https://prnt.sc/1rov5d1

Ref:- https://knowledge.hubspot.com/design-manager/create-and-edit-modules


Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
theAndreyK
Contributor | Partner

I'm developing locally so in theory I can add the a source map anywhere but the more I think about it the more it feels weird to add a source map to a file that I don't really have access to and didn't create.

 

I wonder if instead there's a way to mark it as third-party code? 

0 Upvotes
dennisedson
Community Manager

@theAndreyK , are you being dinged for that?  That seems like a silly thing to be penalized for...

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes
theAndreyK
Contributor | Partner

Yea, it's crazy. This is pretty much the last thing keeping me from a perfect score... 

 

 

0 Upvotes
dennisedson
Community Manager

Bringing in the big guns on this one for some opinions 💪

@Phil_Vallender , @tjoyce -- either of you have thoughts? 

That is a silly question, when has Tim not had thoughts on something 🙃

Thanks,

Dennis




Check out our Community Developer Blog
where we feature our Community driven developer podcast and how to content
0 Upvotes