1 | import _extends from '@babel/runtime/helpers/esm/extends';
|
2 | import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
3 | import jsx from '@babel/plugin-transform-react-jsx';
|
4 | import pragmatic from '@emotion/babel-plugin-jsx-pragmatic';
|
5 | import emotion from '@emotion/babel-plugin';
|
6 |
|
7 | var pragmaName = '___EmotionJSX';
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | var index = (function (api, _temp) {
|
13 | var _ref = _temp === void 0 ? {} : _temp,
|
14 | pragma = _ref.pragma,
|
15 | sourceMap = _ref.sourceMap,
|
16 | autoLabel = _ref.autoLabel,
|
17 | labelFormat = _ref.labelFormat,
|
18 | importMap = _ref.importMap,
|
19 | options = _objectWithoutPropertiesLoose(_ref, ["pragma", "sourceMap", "autoLabel", "labelFormat", "importMap"]);
|
20 |
|
21 | if (options.runtime) {
|
22 | throw new Error('The `runtime` option has been removed. If you want to configure `runtime: "automatic"`, replace `@emotion/babel-preset-css-prop` with `@babel/preset-react` and `@emotion/babel-plugin`. You can find out how to configure things properly here: https://emotion.sh/docs/css-prop#babel-preset');
|
23 | }
|
24 |
|
25 | return {
|
26 | plugins: [[pragmatic, {
|
27 | "export": 'jsx',
|
28 | module: '@emotion/react',
|
29 | "import": pragmaName
|
30 | }], [jsx, _extends({
|
31 | pragma: pragmaName,
|
32 | pragmaFrag: 'React.Fragment'
|
33 | }, options)], [emotion, {
|
34 | sourceMap: sourceMap,
|
35 | autoLabel: autoLabel,
|
36 | labelFormat: labelFormat,
|
37 | cssPropOptimization: true,
|
38 | importMap: importMap
|
39 | }]]
|
40 | };
|
41 | });
|
42 |
|
43 | export default index;
|