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

Update packages appropriately for Webpack v1 compatibility #34

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

adityavohra7
Copy link
Contributor

Fixes #17.

When babel-upgrade is run over a project that uses Webpack v1:

  • Use babel-loader@7.1.1 (from this suggestion)
  • Use babel-core@^7.0.0-bridge.0

This repo repros the bug from this issue. Running babel-upgrade --install with the diff from this PR fixes the Webpack error.

@adityavohra7
Copy link
Contributor Author

adityavohra7 commented Feb 24, 2018

Fixing test failure that's happening because my code assumes dev deps always exist.
Edit: fixed.

@hzoo
Copy link
Member

hzoo commented Feb 24, 2018

Great, we just need a test fixture for this as well

@adityavohra7
Copy link
Contributor Author

Updated!

{
"name": "webpack-v1-compatibility",
"devDependencies": {
"babel-loader": "^7.1.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I was confused why it should be 7.1.1 but I guess there's an issue?

// Later versions of babel-loader are incompatible with Webpack v1.
// https://github.com/babel/babel-loader/issues/505
if (depsWebpack1 && dependencies['babel-loader']) {
console.log('Updating babel-loader to v7.1.1 as this project uses Webpack v1');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should say, please update webpack if you can 😄 https://webpack.js.org/guides/migrating/? don't have to

@hzoo hzoo merged commit d73b06a into babel:master Feb 24, 2018
@hzoo hzoo added the enhancement New feature or request label Feb 24, 2018
@adityavohra7 adityavohra7 deleted the babel_upgrade_issue_17 branch February 24, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect update babel-loader for webpack 1
2 participants