Revert "Implement styled-jsx with swc's styled_jsx" (vercel/turbo#366)

Revert "Implement styled-jsx with swc's styled_jsx (vercel/turbo#354)"

This reverts commit 255a38b07c98252bfe442ee363f07924da45288a.
This commit is contained in:
Will Binns-Smith 2022-09-14 17:24:08 -07:00 committed by GitHub
parent f4e28a07ef
commit b6d38cd4fd
4 changed files with 1 additions and 31 deletions

View file

@ -87,7 +87,6 @@ pub async fn create_server_rendered_source(
};
let client_module_options_context = ModuleOptionsContext {
enable_react_refresh,
enable_styled_jsx: true,
}
.cell();
let next_client_transition = NextClientTransition {

View file

@ -57,7 +57,6 @@ pub async fn create_web_entry_source(
// we try resolve it once at the root and pass down a context to all
// the modules.
enable_react_refresh,
enable_styled_jsx: true,
}
.into(),
)

View file

@ -1,25 +0,0 @@
import React from 'react'
import TestRenderer from 'react-test-renderer'
describe('styled-jsx', () => {
it('compiles away <style jsx>', () => {
const test = TestRenderer.create(
<>
<span>This should be color: red</span>
<style jsx>{`
span {
color: red;
}
`}</style>
</>,
)
expect(test.toJSON()).toMatchObject({
children: ['This should be color: red'],
props: {
className: /jsx\-[0-9a-f]+/,
},
type: 'span',
})
})
})

View file

@ -2,10 +2,7 @@
"private": true,
"devDependencies": {
"expect": "^24.5.0",
"jest-circus-browser": "^1.0.7",
"react": "^18.2.0",
"react-test-renderer": "^18.2.0",
"styled-jsx": "^5.0.7"
"jest-circus-browser": "^1.0.7"
},
"installConfig": {
"hoistingLimits": "workspaces"