diff --git a/files-override/js/app/app.js b/files-override/js/app/app.js index 9f0c043..5edea3d 100644 --- a/files-override/js/app/app.js +++ b/files-override/js/app/app.js @@ -4,18 +4,10 @@ import Resolver from 'ember-resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; -let d = window.define; - -for (const [name, module] of Object.entries(compatModules)) { - d(name, function () { - return module; - }); -} - export default class App extends Application { modulePrefix = config.modulePrefix; podModulePrefix = config.podModulePrefix; - Resolver = Resolver; + Resolver = Resolver.withModules(compatModules); } -loadInitializers(App, config.modulePrefix); +loadInitializers(App, config.modulePrefix, compatModules); diff --git a/index.js b/index.js index 0c12c4b..2b8472f 100644 --- a/index.js +++ b/index.js @@ -45,13 +45,6 @@ module.exports = { ...Object.keys(manifest.devDependencies || {}), ]; - let ensureLatestDeps = [ - 'eslint', - 'eslint-plugin-ember', - 'eslint-plugin-n', - '@babel/eslint-parser', - ]; - // this.addPackagesToProject doesn't respect the packageManager that the blueprint specified 🙈 so we're skipping a level here let installTask = this.taskFor('npm-install'); let uninstallTask = this.taskFor('npm-uninstall'); @@ -68,8 +61,6 @@ module.exports = { 'ember-cli-dependency-checker', 'ember-cli-sri', 'ember-cli-terser', - - ...ensureLatestDeps, // Linting '@babel/plugin-proposal-decorators', ].filter((depToRemove) => existingDeps.includes(depToRemove)), @@ -89,7 +80,12 @@ module.exports = { '@rollup/plugin-babel', 'decorator-transforms', - ...ensureLatestDeps, + 'eslint@latest', + 'eslint-plugin-ember@latest', + 'eslint-plugin-n@latest', + '@babel/eslint-parser@latest', + 'ember-resolver@latest', + 'ember-load-initializers@latest', // Needed for eslint 'globals', 'babel-plugin-ember-template-compilation',