Skip to content

Commit ee8e0d2

Browse files
committed
chore: 🤖 add comment explaining omitting mirage deps in build
1 parent 6e2655e commit ee8e0d2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎addons/api/index.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@ module.exports = {
2525
},
2626

2727
included() {
28-
const env = this.parent?.app?.env ?? 'production';
2928
this._super.included.apply(this, arguments);
29+
const env = this.parent?.app?.env ?? 'production';
3030

31+
// these are dependencies used our mirage code within the
32+
// api addon and should not be included in production builds,
33+
// after this addon has been migrated to a v2 addon this can
34+
// be removed as the addon's dependencies will be statically
35+
// analyzable
3136
if (env === 'production') {
3237
this.options.autoImport.exclude.push(
3338
'miragejs',
3439
'sinon',
3540
'@faker-js/faker',
41+
'js-bexpr',
3642
);
3743
}
3844
},

0 commit comments

Comments
 (0)