diff --git a/app/services/legacy-module-mappings.js b/app/services/legacy-module-mappings.js index 9b535230..eac3522f 100644 --- a/app/services/legacy-module-mappings.js +++ b/app/services/legacy-module-mappings.js @@ -1,7 +1,8 @@ -import fetch from 'fetch'; import Service from '@ember/service'; import { tracked } from '@glimmer/tracking'; +import mappings from 'ember-rfc176-data/mappings.json'; + const LOCALNAME_CONVERSIONS = { Object: 'EmberObject', Array: 'EmberArray', @@ -13,8 +14,6 @@ export default class LegacyModuleMappingsService extends Service { async initMappings() { try { - let response = await this.fetch(); - let mappings = await response.json(); let newMappings = this.buildMappings(mappings); this.mappings = newMappings; } catch (e) { @@ -32,10 +31,6 @@ export default class LegacyModuleMappingsService extends Service { }); } - fetch() { - return fetch('/assets/mappings.json'); - } - getModule(name, documentedModule) { if (!this.mappings) { return ''; diff --git a/ember-cli-build.js b/ember-cli-build.js index 2b2f5ef9..251fa0e8 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -57,12 +57,6 @@ module.exports = function (defaults) { }, }); - let mappingsTree = new Funnel('node_modules/ember-rfc176-data/', { - srcDir: '/', - include: ['mappings.json'], - destDir: '/assets/', - }); - const { Webpack } = require('@embroider/webpack'); const appTree = require('@embroider/compat').compatBuild(app, Webpack, { staticAddonTrees: true, @@ -72,5 +66,5 @@ module.exports = function (defaults) { staticComponents: true, }); - return mergeTrees([require('prember').prerender(app, appTree), mappingsTree]); + return mergeTrees(require('prember').prerender(app, appTree)); };