question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not add generated comment header to already minified files.

See original GitHub issue

When I tried to access https://cdn.jsdelivr.net/npm/hyperapp I got this header with the code:

/**
 * Skipped minification because the original files appears to be already minified.
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */

Would you consider not adding this header by default?

Cheers!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MartinKolarikcommented, Sep 18, 2017

The header is important because it allows you to distinguish between files provided directly in the package and those generated on our end. You can always use the direct link to get the original file: https://cdn.jsdelivr.net/npm/hyperapp@0.12.1/dist/hyperapp.js (the one that’s served at the short link is https://cdn.jsdelivr.net/npm/hyperapp@0.12.1/dist/hyperapp.min.js)

0reactions
MartinKolarikcommented, Sep 18, 2017

In that case just use the direct link as I suggested before.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tsc - Can I add additional comments in generated javascript ...
Working on an open-source project, I'm trying to find a way to have comments in javascript header such as "AUTO-GENERATED FILE, DO NOT...
Read more >
Minification - WP-Optimize - FAQs
How do I exclude individual CSS files from being minified and merged? How do I merge but not minify my CSS files, or...
Read more >
The complete best practices for minifying CSS - LogRocket Blog
Minifying CSS files is more nuanced than you might think at first. Learn the various minification tools, how to determine and remove unused ......
Read more >
V3.0-3.08 Not creating cache files | WordPress.org
Hi Raul,. I have four sites two on a Litespeed server and two on an Apache server. Both servers are using the latest...
Read more >
Tutorial: How to Minify & Version a JS File with NPM Scripts
Minify your script.js file as script.min.js; Add the new version number and build time to the header of your script.min.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found