{"_id":"@emotion/babel-plugin-jsx-pragmatic","_rev":"4536927","name":"@emotion/babel-plugin-jsx-pragmatic","description":"Insert code to load a module corresponding to JSX pragma.","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"time":{"modified":"2026-04-09T14:50:38.000Z","created":"2019-02-04T07:07:15.512Z","0.3.0":"2024-07-19T06:51:57.235Z","0.2.1":"2023-05-06T08:49:11.706Z","0.2.0":"2022-07-31T09:06:33.320Z","0.1.5":"2019-12-22T23:11:16.779Z","0.1.4":"2019-10-29T11:45:14.233Z","0.1.3":"2019-06-25T23:08:16.013Z","0.1.2":"2019-03-11T06:32:17.875Z","0.1.1":"2019-03-11T06:24:21.108Z","0.1.0":"2019-02-04T07:07:15.512Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/emotion-js/emotion.git#main"},"versions":{"0.3.0":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.3.0","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/emotion-babel-plugin-jsx-pragmatic.cjs.js","module":"dist/emotion-babel-plugin-jsx-pragmatic.esm.js","exports":{".":{"module":"./dist/emotion-babel-plugin-jsx-pragmatic.esm.js","import":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.mjs","default":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.js"},"./package.json":"./package.json"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emotion-js/emotion.git#main"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.17.12"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.18.5","@types/babel__core":"^7.1.18"},"types":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.d.ts","gitHead":"d57cfcb6daf48fc5458f91b4db2e072fbc2863e4","bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"homepage":"https://github.com/emotion-js/emotion/tree/main#readme","_id":"@emotion/babel-plugin-jsx-pragmatic@0.3.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"shasum":"12bde56c351f5981e5de66c99e62c371df6c42ca","size":3821,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.3.0.tgz"},"_npmUser":{"name":"emotion-release-bot","email":"emotion-release-bot@hamil.town"},"directories":{},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.3.0_1721371917046_0.14777670530171205"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-19T06:51:57.235Z","publish_time":1721371917235,"_source_registry_name":"default","_cnpm_publish_time":1721371917235},"0.2.1":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.2.1","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/emotion-babel-plugin-jsx-pragmatic.cjs.js","module":"dist/emotion-babel-plugin-jsx-pragmatic.esm.js","exports":{".":{"module":"./dist/emotion-babel-plugin-jsx-pragmatic.esm.js","import":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.mjs","default":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.js"},"./package.json":"./package.json"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emotion-js/emotion.git#main"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.17.12"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.18.5"},"gitHead":"1135f8e9d97ea711eb483368313afdfe7b176845","bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"homepage":"https://github.com/emotion-js/emotion/tree/main#readme","_id":"@emotion/babel-plugin-jsx-pragmatic@0.2.1","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"shasum":"01d3306fde73b60d683f78f3bd9f6b2c919b63b6","size":3295,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.2.1.tgz"},"_npmUser":{"name":"emotion-release-bot","email":"emotion-release-bot@hamil.town"},"directories":{},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.2.1_1683362951538_0.7283924125108749"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-06T08:49:11.706Z","publish_time":1683362951706,"_source_registry_name":"default","_cnpm_publish_time":1683362951706},"0.2.0":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.2.0","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/emotion-babel-plugin-jsx-pragmatic.cjs.js","module":"dist/emotion-babel-plugin-jsx-pragmatic.esm.js","exports":{".":{"module":"./dist/emotion-babel-plugin-jsx-pragmatic.esm.js","default":"./dist/emotion-babel-plugin-jsx-pragmatic.cjs.js"},"./package.json":"./package.json"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/emotion-js/emotion.git#main"},"scripts":{"test:typescript":"exit 0"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.17.12"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.18.5"},"gitHead":"a5f43a1ba3dae5141b9c356b8b7e13f7023895b3","bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"homepage":"https://github.com/emotion-js/emotion/tree/main#readme","_id":"@emotion/babel-plugin-jsx-pragmatic@0.2.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"6fdd78600417973fa2610704693158181d8505b7","size":3193,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.2.0.tgz"},"_npmUser":{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},"directories":{},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.2.0_1659258393070_0.45605074943664525"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-31T09:06:53.521Z","publish_time":1659258393320,"_cnpm_publish_time":1659258393320},"0.1.5":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.5","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.5.5"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.5","_nodeVersion":"10.18.0","_npmVersion":"6.10.2","dist":{"shasum":"27debfe9c27c4d83574d509787ae553bf8a34d7e","size":3689,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.5.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmUser":{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.5_1577056276590_0.5786140849673447"},"_hasShrinkwrap":false,"publish_time":1577056276779,"_cnpm_publish_time":1577056276779,"_cnpmcore_publish_time":"2021-12-16T13:51:06.680Z"},"0.1.4":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.4","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"@babel/core":"^7.5.5"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.4","_nodeVersion":"10.17.0","_npmVersion":"6.10.2","dist":{"shasum":"12fd120ecb202c6110dc98d3edabddafda1515f1","size":2942,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.4.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmUser":{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.4_1572349514068_0.25874924912729114"},"_hasShrinkwrap":false,"publish_time":1572349514233,"_cnpm_publish_time":1572349514233,"_cnpmcore_publish_time":"2021-12-16T13:51:06.907Z"},"0.1.3":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.3","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.3","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"e06489b00bda80304e7198be76f448dd267df397","size":2555,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.3.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.3_1561504095864_0.6218824909497307"},"_hasShrinkwrap":false,"publish_time":1561504096013,"_cnpm_publish_time":1561504096013,"_cnpmcore_publish_time":"2021-12-16T13:51:07.100Z"},"0.1.2":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.2","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.2","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"shasum":"bb98bbef8effe83418307563c34e784deae57a1a","size":2462,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.2.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.2_1552285937706_0.9200215434188763"},"_hasShrinkwrap":false,"publish_time":1552285937875,"_cnpm_publish_time":1552285937875,"_cnpmcore_publish_time":"2021-12-16T13:51:07.351Z"},"0.1.1":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.1","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"peerDependencies":{"@babel/core":"^7.0.0"},"publishConfig":{"access":"public"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.1","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"shasum":"91c05d9f0051dcb394440ecde6d68b746b61a6cf","size":2459,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.1.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.1_1552285460959_0.842672525313559"},"_hasShrinkwrap":false,"publish_time":1552285461108,"_cnpm_publish_time":1552285461108,"_cnpmcore_publish_time":"2021-12-16T13:51:07.571Z"},"0.1.0":{"name":"@emotion/babel-plugin-jsx-pragmatic","version":"0.1.0","description":"Insert code to load a module corresponding to JSX pragma.","main":"dist/babel-plugin-jsx-pragmatic.cjs.js","module":"dist/babel-plugin-jsx-pragmatic.esm.js","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-jsx-pragmatic"},"dependencies":{"@babel/plugin-syntax-jsx":"^7.2.0"},"publishConfig":{"access":"public"},"_id":"@emotion/babel-plugin-jsx-pragmatic@0.1.0","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"shasum":"fc980ee7f50f7b949ca76b4897e992739076b93d","size":2450,"noattachment":false,"key":"/@emotion/babel-plugin-jsx-pragmatic/-/@emotion/babel-plugin-jsx-pragmatic-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@emotion/babel-plugin-jsx-pragmatic/download/@emotion/babel-plugin-jsx-pragmatic-0.1.0.tgz"},"maintainers":[{"name":"andarist","email":""},{"name":"emmatown","email":""},{"name":"emotion-release-bot","email":"mitchell+emotion-release-bot@hamil.town"},{"name":"tkh44","email":"kye.hohenberger@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-jsx-pragmatic_0.1.0_1549264035339_0.5893329067945607"},"_hasShrinkwrap":false,"publish_time":1549264035512,"_cnpm_publish_time":1549264035512,"_cnpmcore_publish_time":"2021-12-16T13:51:07.799Z"}},"readme":"# @emotion/babel-plugin-jsx-pragmatic\n\nThis package is a fork of [babel-plugin-jsx-pragmatic](https://github.com/jmm/babel-plugin-jsx-pragmatic) to support React Fragments.\n\nThe original README of babel-plugin-jsx-pragmatic with some modifications is shown below.\n\n---\n\n[@babel/plugin-transform-react-jsx](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx.html) has a `pragma` option that's used when transforming JSX to function calls instead of the default function `React.createElement`.\n\nThis Babel plugin is a companion to that feature that allows you to dynamically load a module associated with the `pragma` value.\n\nExample:\n\nGiven this file:\n\n```js\n<Some jsx=\"element\" />\n```\n\nbabel would normally transform the JSX to:\n\n```js\nReact.createElement(Some, { jsx: 'element' })\n```\n\nBy setting the `pragma` option like this:\n\n```js\nbabel.transformSync(code, {\n  plugins: [\n    [\n      '@babel/plugin-transform-react-jsx',\n      {\n        pragma: 'whatever'\n      }\n    ]\n  ]\n})\n```\n\nIt would instead transform it to:\n\n```js\nwhatever(Some, { jsx: 'element' })\n```\n\nHowever, you might need to load a module corresponding to `whatever` in each module containing JSX:\n\n```js\nimport whatever from 'whatever'\n// or\nvar whatever = require('whatever')\n```\n\nThis plugin allows you to make that part dynamic as well:\n\n```js\nbabel.transformSync(code, {\n  plugins: [\n    [\n      '@babel/plugin-transform-react-jsx',\n      {\n        pragma: 'whatever'\n      }\n    ],\n\n    [\n      '@emotion/babel-plugin-jsx-pragmatic',\n      {\n        module: '/something/whatever',\n        import: 'whatever'\n      }\n    ]\n  ]\n})\n```\n\nResults in:\n\n```js\nimport { default as whatever } from '/something/whatever'\n```\n\n## Options\n\n### `module`\n\nString. Module ID or pathname. The value of the `ModuleSpecifier` of an import. Required.\n\n### `import`\n\nString. The identifier that you want to import the `module` with. This should correspond to the root identifier of the `pragma` value. Required. Examples:\n\n```js\n{\n  plugins: [\n    [\n      '@babel/plugin-transform-react-jsx',\n      {\n        pragma: 'x'\n      }\n    ],\n\n    [\n      '@emotion/babel-plugin-jsx-pragmatic',\n      {\n        module: '/something/whatever',\n        import: 'x'\n      }\n    ]\n  ]\n}\n\n{\n  plugins: [\n    [\n      '@babel/plugin-transform-react-jsx',\n      {\n        pragma: 'x.y'\n      }\n    ],\n\n    [\n      '@emotion/babel-plugin-jsx-pragmatic',\n      {\n        module: '/something/whatever',\n        import: 'x'\n      }\n    ]\n  ]\n}\n```\n\n### `export`\n\nString. The export that you want to import as `import` from `module`. Default value is `default` (the default export). Examples:\n\n```js\n// Will import the default export (`default`)\n{\n  module: \"whatever\",\n  import: \"x\"\n}\n// import {default as x} from \"whatever\"\n\n\n// Will import the default export (`default`)\n{\n  module: \"whatever\",\n  import: \"x\",\n  export: \"default\",\n}\n// import {default as x} from \"whatever\"\n\n\n// Will import the export named `something`\n{\n  module: \"whatever\",\n  import: \"x\",\n  export: \"something\",\n}\n// import {something as x} from \"whatever\"\n```\n\n# Known Issues\n\n- Doesn't do anything special in the case that the file being transformed\n  already imports or declares an identifier with the same name as `import`.\n\n- Doesn't take into account when a file actually contains a JSX pragma comment.\n","_attachments":{},"homepage":"https://github.com/emotion-js/emotion/tree/main#readme","bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"license":"MIT"}