Open NullVoxPopuli opened 3 months ago
does it work using the app name? i.e. import Foo from 'app-name/components/foo'
?
It does not:
Module not found: Error:
Can't resolve 'app-imports-import-app-imports/components/foo'
in '/home/nvp/Development/tmp/appImports-import-appImports/app/util'
Something interesting I see from this output is:
aliased with mapping 'app-imports-import-app-imports': '/home/nvp/Development/tmp/appImports-import-appImports/app' to '/home/nvp/Development/tmp/appImports-import-appImports/app/components/foo.js'
which seems like a goofy? idk, or maybe I don't know what it's trying to tell me?
You're missing this config on your repo in the ember-cli-build.js
file
babel: {
plugins: [require.resolve('ember-auto-import/babel-plugin')],
},
Thanks for pointing that out!
after adding that however, I get:
ERROR in ./app/util/idk.js 2:0-39
Module not found: Error: Can't resolve '../components/foo.js' in '/home/nvp/Development/tmp/appImports-import-appImports/app/util'
resolve '../components/foo.js' in '/home/nvp/Development/tmp/appImports-import-appImports/app/util'
using description file: /home/nvp/Development/tmp/appImports-import-appImports/package.json (relative path: ./app/util)
Field 'browser' doesn't contain a valid alias configuration
with both absolute and relative import paths, with and without the js extension.
Repro: https://github.com/NullVoxPopuli/ember-auto-import-repro-appImports-import-other-appImports
Scenario:
hi
app/util/idk.js
Config:
Try to import
import './util/idk';
from anywhereError: