Skip to content
This repository was archived by the owner on Apr 9, 2020. It is now read-only.

Commit 276c8b6

Browse files
committed
Remove support for the deprecated config format
1 parent d4c90c7 commit 276c8b6

File tree

4 files changed

+0
-290
lines changed

4 files changed

+0
-290
lines changed

src/index.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ export default function ({ Plugin, types: t }) {
8686
Array.isArray(options.transforms);
8787
}
8888

89-
let didWarnAboutLegacyConfig = false;
90-
function warnOnceAboutLegacyConfig() {
91-
if (didWarnAboutLegacyConfig) {
92-
return;
93-
}
94-
console.warn(
95-
'Warning: you are using an outdated format of React Transform configuration. ' +
96-
'Please update your configuration to the new format. See the Releases page for migration instructions: ' +
97-
'https://github.com/gaearon/babel-plugin-react-transform/releases'
98-
);
99-
didWarnAboutLegacyConfig = true;
100-
}
101-
10289
/**
10390
* Enforces plugin options to be defined and returns them.
10491
*/
@@ -108,15 +95,6 @@ export default function ({ Plugin, types: t }) {
10895
}
10996

11097
let pluginOptions = file.opts.extra['react-transform'];
111-
if (Array.isArray(pluginOptions)) {
112-
warnOnceAboutLegacyConfig();
113-
const transforms = pluginOptions.map(option => {
114-
option.transform = option.transform || option.target;
115-
return option;
116-
});
117-
pluginOptions = { transforms };
118-
}
119-
12098
if (!isValidOptions(pluginOptions)) {
12199
throw new Error(
122100
'babel-plugin-react-transform requires that you specify ' +

test/fixtures/deprecatedConfig/.babelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/fixtures/deprecatedConfig/actual.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

test/fixtures/deprecatedConfig/expected.js

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)