Hello!
I have an add-on that wraps a rather large package. Dynamically importing that package is working as expected. I’m interested in dynamically importing a file within my addon that imports and configures a class exported from the package.
I have the code setup:
// `@org/scheduler` is the package name
// `views/audits/schedule` is the location of the file within /addon
this.AuditScheduleClass = (
await import('@org/scheduler/views/audits/schedule')
).default;
I should also note that the file itself is a typescript file.
It looks as if ember-auto-import
is not generating the dynamic import for that file. I imagine it’s skipping it because of some dependency/devDependency rule? Has anyone else done this?
Also, does doing this actually get me any bundle savings? Does ember-cli just gobble up everything within addon and add it to the vendor payload anyway?
Thanks for the help!