Skip to content

Commit

Permalink
Merge pull request #1030 from embroider-build/ember-get-config-compat
Browse files Browse the repository at this point in the history
fix the ember-get-config compat adapter
  • Loading branch information
ef4 committed Dec 7, 2021
2 parents 840f043 + ec632db commit 6343e9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/compat/src/compat-adapters/ember-get-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import V1Addon from '../v1-addon';
import writeFile from 'broccoli-file-creator';
import mergeTrees from 'broccoli-merge-trees';

function createIndexContents(config: any): string {
return `export default ${JSON.stringify(config)};`;
Expand All @@ -22,6 +23,9 @@ export default class extends V1Addon {
const configModule = require(this.app.configPath());
const appEnvironmentConfig = configModule(this.app.env);

return writeFile('index.js', createIndexContents(appEnvironmentConfig));
return mergeTrees([
writeFile('index.js', createIndexContents(appEnvironmentConfig)),
writeFile('package.json', JSON.stringify(this.newPackageJSON, null, 2)),
]);
}
}

0 comments on commit 6343e9c

Please sign in to comment.