File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed
Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -25,24 +25,20 @@ export const emotionPlugin = createPlugin({
2525 setup : {
2626 description : "setting up Emotion" ,
2727 run : async ( ) => {
28- await addTypeScriptSupportForTheEmotionCssProp ( )
28+ /*
29+ * Add TypeScript support for the css-prop as per the Emotion docs: https://emotion.sh/docs/typescript#css-prop
30+ */
31+ await modifyJsonFile ( "tsconfig.json" , ( tsConfig ) => ( {
32+ ...tsConfig ,
33+ compilerOptions : {
34+ ...toObject ( tsConfig [ "compilerOptions" ] ) ,
35+ jsxImportSource : "@emotion/react" ,
36+ } ,
37+ } ) )
2938 } ,
3039 } ,
3140 } ,
32- swcCompilerOptions : {
41+ compilerOptions : {
3342 emotion : true ,
3443 } ,
3544} as const )
36-
37- /**
38- * Add TypeScript support for the css-prop as per the Emotion docs: https://emotion.sh/docs/typescript#css-prop
39- */
40- const addTypeScriptSupportForTheEmotionCssProp = async ( ) => {
41- await modifyJsonFile ( "tsconfig.json" , ( tsConfig ) => ( {
42- ...tsConfig ,
43- compilerOptions : {
44- ...toObject ( tsConfig [ "compilerOptions" ] ) ,
45- jsxImportSource : "@emotion/react" ,
46- } ,
47- } ) )
48- }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const styledComponentsPlugin = createPlugin({
2828 ] ,
2929 } ,
3030 ] ,
31- swcCompilerOptions : {
31+ compilerOptions : {
3232 styledComponents : true ,
3333 } ,
3434} as const )
You can’t perform that action at this time.
0 commit comments