Description
Describe the bug
The options
object from the useFieldPlugin
is continuously undefined in my field plugins. I logged out the type
also and I can see that it's stuck in a loading
value.
I'm experiencing this on with the version "@storyblok/field-plugin": "1.0.1"
and "vue": "^3.2.47"
. I also created a new project using version "@storyblok/field-plugin": "1.0.2",
.
I really would love to get a fix for this as we need to use the same plugin for multiple StoryBlok spaces so we are relying on the options to switch the credentials.
To Reproduce
Steps to reproduce the behavior:
Log out the options
object from the useFieldPlugin
as shown below;
<script setup lang="ts">
import type { SetModalOpen } from '@storyblok/field-plugin'
import { useFieldPlugin } from '@storyblok/field-plugin/vue3';
const { data: pluginData, type: pluginType } = useFieldPlugin()
console.log("PLUGIN OPTIONS", pluginData?.options);
const props = defineProps<{
isModalOpen: boolean
setModalOpen: SetModalOpen<any>
}>()
</script>
Expected behavior
The options
object should have the properties defined in the following field-plugin.config.json` file;
{
"options": [
{
"name": "API_URL",
"value": ""
},
{
"name": "API_KEY",
"value": ""
}
]
}
Screenshots
![Screenshot 2024-02-17 at 12 58 16](https://private-user-images.githubusercontent.com/29664439/305644663-733815f6-0c94-4ddb-b00e-394d6bd88ce3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzEwNTksIm5iZiI6MTczODkzMDc1OSwicGF0aCI6Ii8yOTY2NDQzOS8zMDU2NDQ2NjMtNzMzODE1ZjYtMGM5NC00ZGRiLWIwMGUtMzk0ZDZiZDg4Y2UzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDEyMTkxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNmMTczOTI5MDc5Mjc3OTZjMTE4OTFkMTliZmFmNzAwNGMyMWIwY2I0MGM5Y2NlODRkNjI1NThjMjUwMTUwNzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wJpLItt5clYpL7G3cN6YuArMZrR54ZiH0dLuYrTS9Os)
Additional context