Vite/ESM import for protected-eval
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript, vite
- Domain
- build-system, developer-experience
Research direction
Start by inspecting the package's published export and build configuration, then reproduce the documented import in a Vite/TypeScript project. Done means the documented import can be passed directly to Formio.use without manually unwrapping default, with the package build or relevant checks confirming the export behavior.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Openarea: @angular/build
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
angular/angular-cli#34764 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30384 · 1 comment ·
Maintainers usually reply within 1 day
-
P2
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
LucasSantana-Dev/Lucky#3150 ·
Maintainers usually reply within 1 day
-
enhancement good first issue priority: low size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day