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

Webpack Dev Server No Longer Runs On Older Browsers #1105

Closed
1 of 2 tasks
bdwain opened this issue Sep 19, 2017 · 7 comments
Closed
1 of 2 tasks

Webpack Dev Server No Longer Runs On Older Browsers #1105

bdwain opened this issue Sep 19, 2017 · 7 comments

Comments

@bdwain
Copy link
Contributor

bdwain commented Sep 19, 2017

  • Operating System: Mac Sierra
  • Node Version: 8.5
  • NPM Version: 5.4.2 (But I use yarn 1.0.2)
  • webpack Version: 3.6.0
  • webpack-dev-server Version: 2.8.2
  • This is a feature request
  • This is a bug

Code

  // webpack.config.js
  anything will have this issue as long as you run webpack dev server

Expected Behavior

I can run my dev server in chrome 30, the latest browser supported on an old tablet that I'm trying to support, the samsung tab 4

Actual Behavior

It crashes with Uncaught SyntaxError: Use of const in strict mode.

For Bugs; How can we reproduce the behavior?

Run webpack dev server on chrome 30.

I believe the issue originated with this PR #1058, because the const that causes the error is in https://github.com/webpack/webpack-dev-server/blob/master/client/index.js

@shellscape
Copy link
Contributor

@bdwain thanks for creating an issue. buuuuuut please do try searching the issues (or if you have, maybe a few different terms) before hand. we've had a few issues on this already (#1091), and I closed one today (#1104) 😄

Please see those issues for an explanation, but unfortunately supporting really old/behind browsers isn't in the cards.

@bdwain
Copy link
Contributor Author

bdwain commented Sep 19, 2017

sorry i didn't see those. would it not be possible to provide a transpiled version of the client as part of the library's build process (that could be used via an option on the dev server or something)? I know it's extra work to support older browsers, but it's not much extra work and it's useful for a lot of people.

@shellscape
Copy link
Contributor

Providing a transpiled version of the script would imply support for older browsers, I'm afraid. Chrome 30 was released in 2014 and is a full 30 versions behind the latest release. webpack-dev-server being a development tool, it's completely reasonable that we support a variety of recent browsers, and move on from the very old versions. I apologize if this causes you issues with your testing, but please do consider a different vector for testing with webpack/webpack-dev-server on very old browsers.

@lkiarest
Copy link

From product feedbacks we got, several browsers of android phone are still using very old version, they even don't support 'let/const' identifier now.

@shellscape
Copy link
Contributor

@lkiarest unfortunately you'll have to use a pre-v2.8.0 version of the module to test on unsupported browsers.

@mrdulin
Copy link

mrdulin commented Nov 22, 2017

save issue.
SyntaxError: Use of const in strict mode.

I fallback webpack-dev-server from ^2.9.1 to ^2.7.1.
The error gone.

@shellscape
Copy link
Contributor

@mrdulin this is already documented on the README and at webpack.js.org. Also, please do not post "me too" replies on an issue.

@webpack webpack locked and limited conversation to collaborators Nov 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants