-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable babel plugin for styled-components project (#639)
* feat: enable babel plugin for styled-components project * test: add case for styled-components * chore: update pnpm-lock.yaml * test: ignore branch * test: workaround styled-components for case
- Loading branch information
1 parent
3c41810
commit 8ddeed2
Showing
10 changed files
with
1,345 additions
and
145 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default { | ||
esm: {}, | ||
umd: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default (files: Record<string, string>) => { | ||
// expect namespace pefix | ||
expect(files['esm/index.js']).toContain('"some-lib-'); | ||
expect(files['umd/some-lib.min.js']).toContain('"some-lib-'); | ||
|
||
// expect auto set displayName | ||
expect(files['esm/index.js']).toContain('"Foo"'); | ||
expect(files['umd/some-lib.min.js']).toContain('"Foo"'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@org/some-lib", | ||
"dependencies": { | ||
"styled-components": "^6.0.0-beta.15" | ||
}, | ||
"devDependencies": { | ||
"shallowequal": "^1.1.0", | ||
"stylis": "^4.1.3" | ||
}, | ||
"FIXME": "Wait for styled-components fix, ref: https://github.com/styled-components/styled-components/pull/3995" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import styled from 'styled-components'; | ||
|
||
const Foo = styled.div` | ||
color: red; | ||
`; | ||
|
||
export default Foo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters