Skip to content

Commit 269a50c

Browse files
authored
[base] Expose schema creator as CommonJS (#179)
1 parent 1eb7b9c commit 269a50c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/@sanity/base/src/schema/createSchema.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ import geopoint from './types/geopoint'
22
import imageAsset from './types/imageAsset'
33
import fileAsset from './types/fileAsset'
44
import Schema from '@sanity/schema'
5-
export default schemaDef => {
6-
return Schema.compile({
7-
name: schemaDef.name,
8-
types: [...schemaDef.types, geopoint, imageAsset, fileAsset]
9-
})
10-
}
115

6+
module.exports = schemaDef => Schema.compile({
7+
name: schemaDef.name,
8+
types: [...schemaDef.types, geopoint, imageAsset, fileAsset]
9+
})

0 commit comments

Comments
 (0)