Skip to content

Commit

Permalink
‼ BREAKING: re-export nested field as default (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedrowaihi authored Jun 14, 2024
1 parent a2d1a58 commit d89bb71
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/blue-toys-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@oberon/docs": minor
"@oberoncms/plugin-flydrive": minor
---

fix export nested field
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export const { GET, POST } = initFlyDriveRouter()

```typescript
// config.ts
import { Image } from "@oberoncms/plugin-flydrive"
import { Image } from "@oberoncms/plugin-flydrive" // <- import the Image component
import ImageNestedField from "@oberoncms/plugin-flydrive/field" // <- import the nested field
export const editorConfig = {
// other configurations
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/flydrive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"browser": "./dist/index.js",
"node": "./dist/server.js"
},
"./field": "./dist/blocks/field.js",
"./plugin": "./dist/plugin.js"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/flydrive/src/blocks/field.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Image } from "./client"
import * as client from "./client"

export const ImageNestedField = Image.fields.image
export default client.Image.fields.image
1 change: 0 additions & 1 deletion packages/plugins/flydrive/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./blocks/client"
export * from "./blocks/field"

0 comments on commit d89bb71

Please sign in to comment.