modernizr-neue icon indicating copy to clipboard operation
modernizr-neue copied to clipboard

Beacon API breaks build

Open rejas opened this issue 6 years ago • 2 comments

Calling Modernizr via: <script src="js/vendor/modernizr-3.6.0.custom.min.js"></script>

When Modernizr is built using https://modernizr.com/download/?-beacon-localstorage-video-webp-addtest-setclasses-shiv, Modernizr fails to load with the following issue:

modernizr-3.6.0.custom.min.js:3 Uncaught ReferenceError: define is not defined at modernizr-3.6.0.custom.min.js:3

Adjusting to https://modernizr.com/download/?-localstorage-video-webp-addtest-setclasses-shiv (i.e. removing the Beacon API) works fine.

This also applies to the development build https://modernizr.com/download?do_not_use_in_production

Tested in latest Chrome; can be replicated in Firefox as well.

(Moved from https://github.com/Modernizr/Modernizr/issues/2303)

rejas avatar Jun 12 '18 13:06 rejas

not happening for me, could be a race condition issue in the build however. Could you post a gist of the actual output file?

patrickkettner avatar Jun 14 '18 18:06 patrickkettner

tried again with firefox, broken build, see https://gist.github.com/rejas/06b78e9c1812cac551c4509316e0c490 same urls works for safari though but strangely chrome generates something valid now too..... sounds racy indeed...

rejas avatar Jun 14 '18 18:06 rejas