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

transpile client bundles with babel #1242

Merged
merged 2 commits into from
Jan 5, 2018

Conversation

yyx990803
Copy link
Contributor

@yyx990803 yyx990803 commented Dec 21, 2017

What kind of change does this PR introduce?
bugfix

Did you add or update the examples/?
No.

Summary
ref: #1241
The only reason I can think of regarding not merging #1241 is the added overhead of having to use ES5 when working on client files plus differing ESLint config for that part of the codebase.

This can be done by transpiling all the client files with babel beforehand. Since the client files are already bundled, this is simply adding babel-loader. This gets rid of the need for users having to do this workaround in their own config, and allows future iterations on the client files to be done using latest ES features.

This would be a pure win for both maintainers and users: maintainers no longer need to worry about backwards compat when working on client files, users no longer need to worry about dev-server not working in older browsers.

This also fixes the unintended breaking change introduced in 2.8.

Does this PR introduce a breaking change?
No.

Other information

@codecov
Copy link

codecov bot commented Dec 21, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@ce30460). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1242   +/-   ##
=========================================
  Coverage          ?   76.31%           
=========================================
  Files             ?        5           
  Lines             ?      477           
  Branches          ?      154           
=========================================
  Hits              ?      364           
  Misses            ?      113           
  Partials          ?        0

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 ce30460...cbec436. Read the comment docs.

@shellscape
Copy link
Contributor

As stated here the webpack core team is discussing this - there are greater issues to consider and patience will be required. Please don't take the "beat the horse until it's reanimated" approach. We get that you want to see this happen.

@shellscape shellscape closed this Dec 21, 2017
@webpack webpack locked and limited conversation to collaborators Dec 21, 2017
@webpack webpack unlocked this conversation Jan 5, 2018
@shellscape
Copy link
Contributor

shellscape commented Jan 5, 2018

After much discussion amongst the team, we've arrived at a plan for webpack-dev-server moving forward. We're going to merge this PR and will be releasing 2.10.0 once testing is complete.

Moving forward, webpack-dev-server enters maintenance mode. We won't be accepting any new features or modifications for this module, only fixes. The 2.x branch will be the final major version of webpack-dev-server, and it will be the last to support Node 4, browsers older than the last two major versions, and browsers which don't support WebSockets.

We'll make a formal announcement with this info (refined), and info regarding the future direction of dev servers for webpack in mid-February.

@shellscape shellscape reopened this Jan 5, 2018
@shellscape
Copy link
Contributor

@yyx990803 please remove package-lock.json from the PR and we'll merge this.

@yyx990803
Copy link
Contributor Author

removed package-lock.json per requested.

@shellscape shellscape merged commit 17355f0 into webpack:master Jan 5, 2018
@shellscape
Copy link
Contributor

shellscape commented Jan 9, 2018

@yyx990803 it would seem that if the entries are added dynamically (https://github.com/webpack/webpack-dev-server/blob/master/lib/util/addDevServerEntrypoints.js) and inline: true that the scripts don't transpile properly, and this change breaks. IE users are reporting errors with templated strings. See #1268

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