最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Apparent dynamic imports from ajvdistruntime in vendor.js build from Angular 18 using latest 8.17.1 - Stack Overflo

programmeradmin1浏览0评论

I am using latest version of AJV Ajv JSON schema validator in an Angular 18 project. I have a single file that imports the AJV libary, sets up its options and uses it to validate my app's JSON. I can provide more implementation details if needed.

I'm not specifically referencing any ajv/dist/runtime modules but when I build my project, I'm seeing 4 different references that appear to be strings referencing dynamic includes in the vendor.js file.

This is preventing my exported web component from running in Salesforce as a LWC due to the apparent use of dynamic imports:

Here are the references from vendor.js:

code: e._'require("ajv/dist/runtime/validation_error").default' }));
e.code = 'require("ajv/dist/runtime/equal").default',
s.code = 'require("ajv/dist/runtime/ucs2length").default'
e.code = 'require("ajv/dist/runtime/uri").default',

Does anyone know if there is a flag I can pass in the options to prevent this or perhaps another workaround? I've tried several mitigation approaches/methods in the angular.json to no avail.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论