Skip to content

Forcing babel-loader 7.1 and updating resolve-rc for new argument #41

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
merged 2 commits into from
Jun 20, 2017

Conversation

weaverryan
Copy link
Member

In babel-loader 7.1, they added a new argument to resolve-rc. This updates Encore to require 7.1 and pass in that new argument.

Of course, the underlying problem is that we're relying on an internal function - so it's entirely valid for them to break BC. We should obviously minimize doing this, but I still think it's a good idea: I don't want to try to re-implement their logic. For example, there are now 2 new places where you can store the Babel configuration... and by using resolve-rc, we're now checking for those automatically.

@weaverryan
Copy link
Member Author

Tests are passing now - the appveyor failures will be fixed via #28

@weaverryan weaverryan merged commit 83341db into symfony:master Jun 20, 2017
@weaverryan weaverryan deleted the fix-babel-loader-7.1 branch June 20, 2017 16:36
@robfrawley
Copy link

robfrawley commented Jun 21, 2017

@weaverryan This change makes using babel-loader v7.0 incompatible with Encore. There must be a changelog that conveys when breaking changes are introduced through use of dependencies! This is important, as yarn doesn't behave like composer in that if someone explicitly requires a different version than your lock file, it doesn't halt in a conflict. Due to this, there should be a more verbose listing of version changes when breaking changes are introduced.

For example, now (if you are using [email protected]):

  FileWriteStream: 
   { [Function: WriteStream]
     super_: { [Function: Writable] WritableState: [Function: WritableState], super_: [Object] } } }
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at find (/home/rmf/repositories/web-apps/rf/node_modules/babel-loader/lib/resolve-rc.js:18:19)
    at module.exports (/home/rmf/repositories/web-apps/rf/node_modules/babel-loader/lib/resolve-rc.js:35:23)
    at module.exports (/home/rmf/repositories/web-apps/rf/node_modules/@symfony/webpack-encore/lib/config/parse-runtime.js:66:47)
    at Object.<anonymous> (/home/rmf/repositories/web-apps/rf/node_modules/@symfony/webpack-encore/bin/encore.js:18:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

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