Hi :)
When using version 2.0.0 in a Vite/TypeScript project, the documented usage:
import ProtectedEval from "@formio/protected-eval";
Formio.use(ProtectedEval);
does not work because the imported value is exposed as:
{
default: {
evaluator: ...
}
}
We currently need to unwrap it before registration:
const protectedEval = (
ProtectedEval as unknown as { default: typeof ProtectedEval }
).default;
Formio.use(protectedEval);
Is this the recommended way to use the Protected Eval plugin in Vite projects, or would it be possible to provide an ESM-compatible export/build in a future release?
Thanks!
Hi :)
When using version 2.0.0 in a Vite/TypeScript project, the documented usage:
does not work because the imported value is exposed as:
We currently need to unwrap it before registration:
Is this the recommended way to use the Protected Eval plugin in Vite projects, or would it be possible to provide an ESM-compatible export/build in a future release?
Thanks!