Ember octane import IFF legacy scripts with ember-auto-import

I am trying to import IFF based legacy script into an Ember Octane web app but I am not getting a clear signal on what is the appropriate way to import this legacy script which I would prefer to not modify.

I tried using “ember g vendor-shim myscript” and adding that to ember-cli-build.js, as app.import(“vendor/shims/myscript”) and (import myscript from ‘myscript’). The blueprint showed a deprecation and I am not seeing what I am missing to be able to do this in ember-auto-import alone.

Info about vendor shims being deprecated. https://deprecations.emberjs.com/ember-cli/v4.x/

Thanks in advance

If it’s not really a module (that uses export), then trying to use import to access it isn’t really a long-term stable thing to do.

There are a lot of ways people have authored IFF-wrapped scripts so I can’t give more specific instructions without knowing more. But in general, you can always choose to use it as a real script, with its own <script> tag. Or often is it a small change of a couple lines to make it into a valid module so that it’s importable. Or you can load it via script tag but also have a valid module in your app that knows how to find it (probably in a global) and exports it’s features so the rest of the app can import them.

Thanks Edward, I appreciate your response.