Skip to content

Commit 049ee42

Browse files
emmatownpieh
authored andcommitted
Change default options for babel-plugin-emotion in gatsby-plugin-emotion (#7651)
1 parent 6e0a7ae commit 049ee42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/gatsby-plugin-emotion/src/gatsby-node.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ exports.onCreateBabelConfig = ({ actions }, pluginOptions) => {
22
actions.setBabelPlugin({
33
name: `babel-plugin-emotion`,
44
options: {
5-
sourceMap: process.env.NODE_ENV === `production` ? false : true,
5+
sourceMap: process.env.NODE_ENV !== `production`,
6+
autoLabel: process.env.NODE_ENV !== `production`,
7+
hoist: process.env.NODE_ENV === `production`,
68
...(pluginOptions ? pluginOptions : {}),
79
},
810
})

0 commit comments

Comments
 (0)