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

Request for ES6+ Distribution to Avoid Legacy JavaScript Warning #688

Closed
basterrika opened this issue May 20, 2024 · 1 comment
Closed

Comments

@basterrika
Copy link

Description

I'm currently using Glide.js v3.6.0 in my project, and I have encountered an issue with Google Lighthouse reporting the following warning:

"Avoid old JavaScript in modern browsers"

The warning appears to be triggered by the ES5-compatible class syntax present in the glide.min.js distribution file. Since modern browsers can handle ES6+ code more efficiently, having ES5 syntax can negatively impact performance.

Steps to Reproduce

  1. Include glide.min.js v3.6.0 in your project.
  2. Run a Google Lighthouse audit on the page that includes Glide.js.
  3. Observe the warning regarding old JavaScript.

Expected Behavior

Lighthouse should not flag Glide.js as using old JavaScript syntax when running audits for modern browsers.

Current Behavior

Lighthouse reports a warning due to the presence of ES5-compatible class syntax in the /dist/glide.min.js file.

Possible Solution

To resolve this, it would be beneficial to provide a distribution build of Glide.js that targets ES6+ environments.

@jedrzejchalubek
Copy link
Member

Glide is distributed as ESM please read more at: https://glidejs.com/docs/setup#using-es-modules

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