Open arpadgabor opened 3 years ago
I'm running into the same issue attempting to register this plugin in Gatsby. It's hard to tell what's exported from the minified distribution. In addition to the notation @arpadgabor posted I also attempted these without success:
import { ParentControl as Control, ParentPreview as Preview } from '@netlify/netlify-cms-widget-parent'
CMS.registerWidget('parent', Control, Preview)
const ParentWidget = require('@netlify/netlify-cms-widget-parent')
CMS.registerWidget('parent', ParentWidget.control, ParentWidget.preview)
Has anyone found a workaround besides resorting to the window?
any solution?
Got the import working like this, but then crashing when opening the parent dropdown.
import '@netlify/netlify-cms-widget-parent'
const parentWidget = window.NetlifyCmsWidgetParent
CMS.registerWidget('parent', parentWidget.control, parentWidget.preview)
I'm gettin this error when I'm trying to initialize the widget manually in typescript:
This is what I'm trying to do:
Not sure if I'm doing anything wrong. The plugin works though by initializing using the script.
I'd help with this but I'm not sure where the problem is.