field-plugin
field-plugin copied to clipboard
fix(sandbox): allow the sandbox to load plugins when running locally
What?
Add the allowAllOrigins
option to the createFieldPlugin
function.
Why?
JIRA: EXT-2258
It allows our demo
package (or any other plugin created by other developers) to be loaded in a local running instance of the Sandbox.
How to reproduce?
From the main
branch run:
yarn
yarn dev:demo
yarn dev:container
Then, this error should appear in your console:
and the demo plugin should not be loaded:
How it should work after the change?
Now, from the task's branch, run these commands:
yarn
yarn dev:demo
yarn dev:sandbox
Then, no error should appear in your console:
and the demo plugin should be loaded:
PS: The Vercel action is not running yet since it wasn't modified to consider the new path (packages/sandbox
) and also the new project name (modified here) in its settings.