diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..41da105 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +test/fixtures \ No newline at end of file diff --git a/test/fixtures/mui/.babelrc b/test/fixtures/mui/.babelrc new file mode 100644 index 0000000..523cc40 --- /dev/null +++ b/test/fixtures/mui/.babelrc @@ -0,0 +1,19 @@ +{ + "plugins": [ + [ + "../../../src", + { + "fileName": false, + "transpileTemplateLiterals": false, + "ssr": true, + "topLevelImportPaths": [ + "@mui/material", + "@mui/material/*", + "@mui/system", + "@mui/styled-engine-sc" + ] + } + ], + ["@babel/plugin-proposal-class-properties", { "loose": true }] + ] +} diff --git a/test/fixtures/mui/code.js b/test/fixtures/mui/code.js new file mode 100644 index 0000000..8e32c21 --- /dev/null +++ b/test/fixtures/mui/code.js @@ -0,0 +1,9 @@ +import { styled as matStyled } from '@mui/material/styles' +import sc from '@mui/material/styles' + +const Test1 = matStyled('div')({ + width: '100%', +}) +const Test2 = sc('div')({ + width: '100%', +}) diff --git a/test/fixtures/mui/output.js b/test/fixtures/mui/output.js new file mode 100644 index 0000000..258b5cd --- /dev/null +++ b/test/fixtures/mui/output.js @@ -0,0 +1,14 @@ +import { styled as matStyled } from '@mui/material/styles'; +import sc from '@mui/material/styles'; +const Test1 = matStyled('div').withConfig({ + displayName: 'Test1', + componentId: 'sc-2jen0y-0', +})({ + width: '100%' +}); +const Test2 = sc('div').withConfig({ + displayName: 'Test2', + componentId: 'sc-2jen0y-1', +})({ + width: '100%' +});