Skip to content

Commit 658fddb

Browse files
committed
fix: remove @emotion/* from jsx importSource
1 parent 9c45b90 commit 658fddb

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

rollup.config.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// <reference types="node" />
22
import { basename, resolve } from 'node:path'
33

4-
import alias from '@rollup/plugin-alias'
54
import commonjs from '@rollup/plugin-commonjs'
65
import { nodeResolve } from '@rollup/plugin-node-resolve'
76
import replace from '@rollup/plugin-replace'
@@ -22,10 +21,6 @@ const dtsOutput = new Set<[string, string]>()
2221
const outputDir = fileURLToPath(new URL('dist', import.meta.url))
2322

2423
const external = [
25-
'@emotion/react',
26-
'@emotion/styled',
27-
'@emotion/react/jsx-runtime',
28-
'@emotion/react/jsx-dev-runtime',
2924
'@mui/material',
3025
'@mui/material/styles',
3126
'copy-to-clipboard',
@@ -65,21 +60,6 @@ const buildMatrix = (input: string, output: string, config: {
6560
cache,
6661
external: config.browser ? [] : external,
6762
plugins: [
68-
alias({
69-
entries: config.browser
70-
? []
71-
: [
72-
{ find: 'react', replacement: '@emotion/react' },
73-
{
74-
find: 'react/jsx-dev-runtime',
75-
replacement: '@emotion/react/jsx-dev-runtime'
76-
},
77-
{
78-
find: 'react/jsx-runtime',
79-
replacement: '@emotion/react/jsx-runtime'
80-
}
81-
]
82-
}),
8363
config.browser && replace({
8464
preventAssignment: true,
8565
'process.env.NODE_ENV': JSON.stringify('production'),
@@ -96,8 +76,7 @@ const buildMatrix = (input: string, output: string, config: {
9676
},
9777
transform: {
9878
react: {
99-
runtime: 'automatic',
100-
importSource: '@emotion/react'
79+
runtime: 'automatic'
10180
}
10281
}
10382
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"rootDir": "./src/",
66
"jsx": "react-jsx",
77
"strict": true,
8-
"jsxImportSource": "@emotion/react",
98
"incremental": false,
109
"declaration": true,
1110
"moduleResolution": "node",

0 commit comments

Comments
 (0)