-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not fail on inline scripts #13
Conversation
if (!assetLocation) { | ||
// skip inline scripts | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo. this is mostly for catching and ignoring inline scripts. Having a link element without a href attribute doesn't sound very useful.
But in both cases I think it's safe to ignore integrity hash calculation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Do you mind adding another test app, which covers the scenario of inline scripts?
|
||
<script></script> | ||
<script type="module"></script> | ||
<script type="text/javascript"></script> | ||
<script type="application/javascript"></script> | ||
<script type="application/json"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test app is like the default one - just this part is different
@enspandi Lockfile seems to be out of sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Released as v0.2.2. |
Thank you for this great addon - just what I was looking for after the popular webpack plugin didn't work ;)
Hope this fix makes sense as I got an error with an inline script (no src):