File: source-maps.mdx

package info (click to toggle)
node-emotion 11.10.7%2Bds1%2B~cs8.3.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,816 kB
  • sloc: javascript: 26,863; makefile: 25
file content (20 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
title: 'Source Maps'
---

> Note:
>
> `@emotion/babel-plugin` is required for source maps

Emotion supports source maps for styles authored in JavaScript.

![Source map demo](https://user-images.githubusercontent.com/662750/30778580-78fbeae4-a096-11e7-82e1-120b6984e875.gif)

Required For Source Maps:

1. `@emotion/babel-plugin` must be in your Babel setup. [[documentation]](/docs/install.mdx)
2. `process.env.NODE_ENV` must be any value except `"production"`

> Note:
>
> Source maps are on by default in @emotion/babel-plugin but they will be removed in production builds