From 221c632c052f010f98df025ecead696b79461457 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 21 May 2015 18:44:02 +0100 Subject: [PATCH] deprecate custom module formatters --- src/babel/transformation/file/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/babel/transformation/file/index.js b/src/babel/transformation/file/index.js index b457a328af..49cedda07e 100644 --- a/src/babel/transformation/file/index.js +++ b/src/babel/transformation/file/index.js @@ -420,6 +420,10 @@ export default class File { getModuleFormatter(type: string) { + if (isFunction(type) || !moduleFormatters[type]) { + this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead."); + } + var ModuleFormatter = isFunction(type) ? type : moduleFormatters[type]; if (!ModuleFormatter) {