Skip to content

Instantly share code, notes, and snippets.

@kiwiupover
Created August 22, 2020 18:08
Show Gist options
  • Save kiwiupover/a72e59ebf66ade6b575da8f9082f1ec6 to your computer and use it in GitHub Desktop.
Save kiwiupover/a72e59ebf66ade6b575da8f9082f1ec6 to your computer and use it in GitHub Desktop.
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
... snipped ...
if ('@embroider/webpack' in app.dependencies()) {
const { Webpack } = require('@embroider/webpack'); // eslint-disable-line
return require('@embroider/compat') // eslint-disable-line
.compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
});
}
return app.toTree();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment