Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent dynamic imports from ajv/dist/runtime in vendor.js build from Angular 18 using latest 8.17.1 #2531

Open
eighties8 opened this issue Jan 29, 2025 · 0 comments

Comments

@eighties8
Copy link

eighties8 commented Jan 29, 2025

I am using latest version of AJV 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.

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

This is preventing my exported web component from running in Salesforce.com 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',

Is there a flag I can pass in the options to prevent this or perhaps another workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant