website
website copied to clipboard
preset-env: update `modules` default value
See https://github.com/babel/babel/pull/8485
Deploy preview for babel ready!
Built with commit 43265b24d3c7dad358a1de8ce75fa1ed4c476a4a
https://deploy-preview-1820--babel.netlify.com
Thanks for the PR!
What are your thoughts on leaving the default value as-is, and instead, add a section atop it that describes how babel-loader@8 uses the caller option to set it to false
automatically?
It's just not true that default value is commonjs
. modules: 'commonjs'
and absense of modules
option have different effects (the former won't be overridden by babel-loader)
🤷♂️ I'm open to what the rest of the team thinks. Ultimately, I agree that the introduction of the caller option makes the notion of "default" a little less clear.
I just think it's important to show both what the behavior is when using the preset directly and what can happen via the caller option... since it's not just babel-loader@8 that can use it.
Maybe we can split the
defaults to `"commonjs"`.
into a new section that explains it explicitly?
Yeah, my initial thought was to just call out the fact that it can be different based on caller, and use babel-loader as an example, but I'm fine with replacing the defaults to
bit completely.
“Allow edits from maintainers” is on, so please feel free to reword it