Skip to content
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

Beacon API breaks build #126

Open
rejas opened this issue Jun 12, 2018 · 2 comments
Open

Beacon API breaks build #126

rejas opened this issue Jun 12, 2018 · 2 comments

Comments

@rejas
Copy link
Member

rejas commented Jun 12, 2018

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 Modernizr/Modernizr#2303)

@patrickkettner
Copy link
Member

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

@rejas
Copy link
Member Author

rejas commented Jun 14, 2018

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants