Skip to content

Commit

Permalink
cleanup uniqueAdd
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Nov 15, 2019
1 parent 645fc66 commit 9f2fb21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
13 changes: 5 additions & 8 deletions packages/private-build-infra/src/stripped-build-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const FilterImports = require.resolve('babel-plugin-filter-imports');
const StripClassCallCheck = require.resolve('babel6-plugin-strip-class-callcheck');
const TransformBlockScoping = require.resolve('@babel/plugin-transform-block-scoping');
const uniqueAdd = require('./utilities/unique-add');

function isProduction(environment) {
return /production/.test(environment);
Expand All @@ -12,20 +11,18 @@ function isProduction(environment) {
module.exports = function(environment, app) {
const isProd = isProduction(environment);
let plugins = [];
let filteredImports = {};
const DebugMacros = require('./debug-macros')(app, isProd);
let postTransformPlugins = [];

if (isProd) {
postTransformPlugins.push([StripClassCallCheck]);
uniqueAdd(filteredImports, '@ember-data/store/-debug', ['assertPolymorphicType']);
let filteredImports = {
'@ember-data/store/-debug': ['assertPolymorphicType'],
};
plugins.push([FilterImports, { imports: filteredImports }]);
}

plugins.push(
[FilterImports, { imports: filteredImports }],
[TransformBlockScoping, { throwIfClosureRequired: true }],
...DebugMacros
);
plugins.push([TransformBlockScoping, { throwIfClosureRequired: true }], ...DebugMacros);

return { plugins, postTransformPlugins };
};
9 changes: 0 additions & 9 deletions packages/private-build-infra/src/utilities/unique-add.js

This file was deleted.

0 comments on commit 9f2fb21

Please sign in to comment.