Enable babel transformer for emotion
Summary: This diff enables the babel transformer for emotion. It is supposed to be a bit faster, but the most interesting thing is that it will show component names inside the dom tree, which, at least for me, will be a huge performance booster is it will make it much easier to find out to which component style changes need to be applied Reviewed By: nikoant Differential Revision: D21722021 fbshipit-source-id: cab1278046b1aa7f8b875c016d43dfafdbaa0a2d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
54162d480c
commit
828385e246
@@ -41,12 +41,14 @@ const objectRestSpreadPlugin = require('@babel/plugin-proposal-object-rest-sprea
|
||||
const flowStripTypesPlugin = require('@babel/plugin-transform-flow-strip-types');
|
||||
const dynamicRequiresPlugin = require('./dynamic-requires');
|
||||
const typeScriptPlugin = require('@babel/plugin-transform-typescript');
|
||||
const emotionPlugin = require('babel-plugin-emotion');
|
||||
const tsTransformPlugins = [
|
||||
typeScriptPlugin,
|
||||
classPropertiesPlugin,
|
||||
commonJsPlugin,
|
||||
optionalChainingPlugin,
|
||||
coalescingOperatorPlugin,
|
||||
[emotionPlugin, {autoLabel: true}],
|
||||
];
|
||||
const jsTransformPlugins = [
|
||||
commonJsPlugin,
|
||||
@@ -56,6 +58,7 @@ const jsTransformPlugins = [
|
||||
optionalChainingPlugin,
|
||||
coalescingOperatorPlugin,
|
||||
dynamicRequiresPlugin,
|
||||
[emotionPlugin, {autoLabel: true}],
|
||||
];
|
||||
|
||||
export default function transform({
|
||||
|
||||
Reference in New Issue
Block a user