1
1
/// <reference types="node" />
2
2
import { basename , resolve } from 'node:path'
3
3
4
- import alias from '@rollup/plugin-alias'
5
4
import commonjs from '@rollup/plugin-commonjs'
6
5
import { nodeResolve } from '@rollup/plugin-node-resolve'
7
6
import replace from '@rollup/plugin-replace'
@@ -22,10 +21,6 @@ const dtsOutput = new Set<[string, string]>()
22
21
const outputDir = fileURLToPath ( new URL ( 'dist' , import . meta. url ) )
23
22
24
23
const external = [
25
- '@emotion/react' ,
26
- '@emotion/styled' ,
27
- '@emotion/react/jsx-runtime' ,
28
- '@emotion/react/jsx-dev-runtime' ,
29
24
'@mui/material' ,
30
25
'@mui/material/styles' ,
31
26
'copy-to-clipboard' ,
@@ -65,21 +60,6 @@ const buildMatrix = (input: string, output: string, config: {
65
60
cache,
66
61
external : config . browser ? [ ] : external ,
67
62
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
- } ) ,
83
63
config . browser && replace ( {
84
64
preventAssignment : true ,
85
65
'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
@@ -96,8 +76,7 @@ const buildMatrix = (input: string, output: string, config: {
96
76
} ,
97
77
transform : {
98
78
react : {
99
- runtime : 'automatic' ,
100
- importSource : '@emotion/react'
79
+ runtime : 'automatic'
101
80
}
102
81
}
103
82
}
0 commit comments