Skip to content

Commit

Permalink
feat: remove babelrc and babel.config from babel-loader
Browse files Browse the repository at this point in the history
If present, it could conflict with tooling when used in a wrong
way. We already provide jsBabelOverride for that, so if needed
user can enable it again.

Closes #11
  • Loading branch information
swashata committed Oct 20, 2018
1 parent e2df10f commit 31d8635
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Object {
Object {
"loader": "babel-loader",
"options": Object {
"babelrc": false,
"configFile": false,
"presets": Array [
Array [
"@wpackio/base",
Expand All @@ -51,6 +53,8 @@ Object {
Object {
"loader": "babel-loader",
"options": Object {
"babelrc": false,
"configFile": false,
"presets": Array [
Array [
"@wpackio/base",
Expand Down
10 changes: 10 additions & 0 deletions packages/scripts/src/config/WebpackConfigHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ ${bannerConfig.copyrightText}${bannerConfig.credit ? creditNote : ''}`,
options: this.getOverrideWebpackRuleOptions(
{
presets: jsPresets,
// disable babelrc and babel.config.js
// as it could potentially break stuff
// rather use the jsBabelOverride
configFile: false,
babelrc: false,
},
this.config.jsBabelOverride
),
Expand Down Expand Up @@ -352,6 +357,11 @@ ${bannerConfig.copyrightText}${bannerConfig.credit ? creditNote : ''}`,
options: this.getOverrideWebpackRuleOptions(
{
presets: tsPresets,
// disable babelrc and babel.config.js
// as it could potentially break stuff
// rather use the jsBabelOverride
configFile: false,
babelrc: false,
// We don't need plugin-proposal-class-properties
// because taken care of by @wpackio/base
// '@babel/proposal-class-properties',
Expand Down

0 comments on commit 31d8635

Please sign in to comment.