Skip to content
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

enable embroider scenarios #699

Merged
merged 2 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
- ember-canary
- ember-classic
- ember-default-with-jquery
# - embroider-safe
# - embroider-optimized
- embroider-safe
- embroider-optimized

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions addon/resolvers/classic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export class ModuleRegistry {
has(moduleName) {
return moduleName in this._entries;
}
get(moduleName) {
return require(moduleName);
get(...args) {
return require(...args);
}
}

Expand Down Expand Up @@ -471,7 +471,7 @@ const Resolver = EmberObject.extend({
},

_extractDefaultExport(normalizedModuleName) {
let module = require(normalizedModuleName, null, null, true /* force sync */);
let module = this._moduleRegistry.get(normalizedModuleName, null, null, true /* force sync */);

if (module && module['default']) {
module = module['default'];
Expand Down
Loading