Skip to content

Commit

Permalink
Sort default components
Browse files Browse the repository at this point in the history
This makes the output a bit more predictable.
  • Loading branch information
remcohaszing committed Jun 22, 2023
1 parent 7504cfb commit cb427e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/mdx/lib/plugin/recma-jsx-rewrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export function recmaJsxRewrite(options) {
/** @type {string} */
let name

for (name of scope.tags) {
for (name of scope.tags.sort()) {
defaults.push({
type: 'Property',
kind: 'init',
Expand Down
4 changes: 2 additions & 2 deletions packages/mdx/test/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ test('jsx', async () => {
'/*@jsxRuntime automatic @jsxImportSource react*/',
'function _createMdxContent(props) {',
' const _components = Object.assign({',
' p: "p",',
' em: "em"',
' em: "em",',
' p: "p"',
' }, props.components);',
' return <_components.p><_components.em>{"a"}</_components.em></_components.p>;',
'}',
Expand Down

0 comments on commit cb427e2

Please sign in to comment.