Skip to content

Commit

Permalink
Try to readd initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp committed Jul 2, 2024
1 parent abc1bf4 commit 0880fba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions ember-can/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"app-js": {
"./helpers/can.js": "./dist/_app_/helpers/can.js",
"./helpers/cannot.js": "./dist/_app_/helpers/cannot.js",
"./initializers/setup-ember-can.js": "./dist/_app_/initializers/setup-ember-can.js",
"./services/abilities.js": "./dist/_app_/services/abilities.js"
}
},
Expand Down
7 changes: 6 additions & 1 deletion ember-can/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
// is aligned to the config here.
// See https://github.com/embroider-build/embroider/blob/main/docs/v2-faq.md#how-can-i-define-the-public-exports-of-my-addon
addon.publicEntrypoints([
'initializers/**/*.js',
'index.js',
'resolver.js',
'ability.ts',
Expand All @@ -31,7 +32,11 @@ export default {
// These are the modules that should get reexported into the traditional
// "app" tree. Things in here should also be in publicEntrypoints above, but
// not everything in publicEntrypoints necessarily needs to go here.
addon.appReexports(['helpers/**/*.js', 'services/**/*.js']),
addon.appReexports([
'helpers/**/*.js',
'initializers/**/*.js',
'services/**/*.js',
]),

// Follow the V2 Addon rules about dependencies. Your code can import from
// `dependencies` and `peerDependencies` as well as standard Ember-provided
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ Resolver.reopen({
};
},
});

export function initialize() {}
export default { initialize };
1 change: 0 additions & 1 deletion test-app/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'test-app/config/environment';
import 'ember-can/resolver';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down

0 comments on commit 0880fba

Please sign in to comment.