-
Notifications
You must be signed in to change notification settings - Fork 136
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
Imports starting with <app-name>/file do not work consistently #1442
Comments
still need to investigate but, maybe a side-effect of #1386 |
Hey thanks for the report 🎉 In general You mentioned that you were trying to import constants in your mirage code, but unfortunately Mirage does some funky stuff and includes your |
Okay, so the mirage folder is treated as an addon and cannot import anything from within the app folder and work properly under embroider? For example a Imports like It's just curious that everything built, all tests passed properly on a specific in-dev version of Embroider from a few months back but after that nothing worked anymore. These versions worked fine but we didn't want to ship with an unstable preview 😄 "@embroider/compat": "2.1.1-unstable.21eae41", I will try to create a repo where this is reproducible. |
With embroider 3.0.0 and using Typescript we get the following error on the page when creating imports like
import config from 'app-name/config/environment';
Changing them to relative paths like
import config from './config/environment';
works fine.Another example where changing the path just does not work at all is making imports inside the mirage folder like:
import { CONSTANTS } from 'app-name/utils/mock-constants';
These ones never resolve properly.
But these imports worked perfectly fine on the following embroider version.
One version newer than that and it breaks.
I can't really provide a repro repo at this time but this is our embroider config:
package.json
The text was updated successfully, but these errors were encountered: