The reason tests pass in v1 addons that have ember-auto-import in devDependencies is because during the build of the dummy app, auto-import is still available.
In v2 addons (for example, using the v2 blueprint) this class of problem is not possible to accidentally slip by, as the separate test app would have caught this issue.
This is the error reported by the new embroider tools:
[plugin:vite:import-analysis] A module tried to resolve "@fortawesome/fontawesome-svg-core" and didn't find it (v1 package without auto-import).
- Maybe a dependency declaration is missing?
- Remember that v1 addons can only import non-Ember-addon NPM dependencies if they include ember-auto-import in their dependencies.
- If this dependency is available in the AMD loader (because someone manually called "define()" for it), you can configure a shim like:
amdCompatibility: {
es: [
["@fortawesome/fontawesome-svg-core", ["default", "yourNamedExportsGoHere"]],
]
}
/home/nvp/Development/NullVoxPopuli/limber/apps/repl/node_modules/.embroider/rewritten-packages/@fortawesome/ember-fontawesome.218b4684/components/fa-icon.js
They key part here is:
Remember that v1 addons can only import non-Ember-addon NPM dependencies if they include ember-auto-import in their dependencies.
The reason tests pass in v1 addons that have ember-auto-import in devDependencies is because during the build of the
dummy
app, auto-import is still available.In v2 addons (for example, using the v2 blueprint) this class of problem is not possible to accidentally slip by, as the separate test app would have caught this issue.
This is the error reported by the new embroider tools:
They key part here is: