Skip to content

Commit 2f6f8b6

Browse files
Fix CSP violation in Vite builds by upgrading asn1.js to 5.4.1
Fixes #28 Added npm overrides to force asn1.js@5.4.1, which removes eval usage that caused Content Security Policy violations in Vite builds. The previous version (4.10.1) used require('vm').runInThisContext() which is incompatible with strict CSP. Dependency chain: browserify → crypto-browserify → browserify-sign → parse-asn1 → asn1.js Verified zero eval() calls in all dist bundles after rebuild.
1 parent 3638623 commit 2f6f8b6

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

package-lock.json

Lines changed: 26 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,8 @@
152152
"sax": "^1.2.4",
153153
"ts-node": "^8.10.2",
154154
"typescript": "^3.9.7"
155+
},
156+
"overrides": {
157+
"asn1.js": "5.4.1"
155158
}
156159
}

0 commit comments

Comments
 (0)