Skip to content

fix: replace const with var to avoid strict mode errors #735

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

Merged

Conversation

MikeyParton
Copy link
Contributor

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I'm using this plugin on an app running on some old webkit browsers (~Safari 7). After updating to webpack 5, I get the following error when running in development mode.

SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.

All the surrounding template code is using var, this one must have been missed.

Breaking Changes

None

Additional Info

None

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #735 (c0d7b49) into master (e8918ab) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #735   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files           6        6           
  Lines         776      776           
  Branches      240      240           
=======================================
  Hits          696      696           
  Misses         77       77           
  Partials        3        3           
Impacted Files Coverage Δ
src/index.js 88.03% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8918ab...c0d7b49. Read the comment docs.

@alexander-akait alexander-akait merged commit 43e081f into webpack-contrib:master Apr 7, 2021
@alexander-akait
Copy link
Member

Big thanks

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

Successfully merging this pull request may close these issues.

2 participants