Currently we can only get to the exports of the module resolved, not the actual module itself.
My use case is this:
I have a series of tests cases that test default export of a module, who's classes changes depending on environment variable -- the "classes changing depending on environment variable" was the easiest way I could integrate these two different solutions (temporarily)
In order to do this, I have to unsee the imported modules, so that the next time ember tries to resolve them, they will be reevaluated. One of my problems is that since (to my knowledge) I can't access the dependencies of the file, and addon files are reexported app -> addon, I can't programatically get to the underlying addon file to have it reexported.
// right now I hard code, which is fine since this is temporary
require.unsee('my-addon/serializer/user');
require.unsee('my-app/serializer/user');
// I feel as though I should be able to do something like
const module = resolver.findModule('serializer:user');
// unsee module and it's deps so they are re-evaluated even if the serializer comes from an addon.
Thoughts or ideas?
Currently we can only get to the exports of the module resolved, not the actual module itself.
My use case is this:
I have a series of tests cases that test default export of a module, who's classes changes depending on environment variable -- the "classes changing depending on environment variable" was the easiest way I could integrate these two different solutions (temporarily)
In order to do this, I have to
unseethe imported modules, so that the next time ember tries to resolve them, they will be reevaluated. One of my problems is that since (to my knowledge) I can't access the dependencies of the file, and addon files are reexportedapp -> addon, I can't programatically get to the underlying addon file to have it reexported.Thoughts or ideas?