Replace amd-inject-loader with inject-loader & use Babel trick for ES6 support

[MAILPOET-1829]
This commit is contained in:
Jan Jakeš
2019-02-20 17:22:09 +01:00
committed by M. Shull
parent 112d780de5
commit 1e1ed6f251
7 changed files with 316 additions and 47 deletions

View File

@ -6,9 +6,11 @@ const jQuery = global.jQuery;
import App from 'newsletter_editor/App';
import AutomatedLatestContentBlock from 'newsletter_editor/blocks/automatedLatestContent';
import ContainerBlock from 'newsletter_editor/blocks/container';
import AutomatedLatestContentInjector from 'amd-inject-loader!newsletter_editor/blocks/automatedLatestContent';
import Communication from 'newsletter_editor/components/communication';
/* eslint-disable-next-line max-len (ES6 -> CommonJS transform needed for inject-loader) */
import AutomatedLatestContentInjector from 'inject-loader!babel-loader?plugins[]=@babel/plugin-transform-modules-commonjs!newsletter_editor/blocks/automatedLatestContent';
var EditorApplication = App;
var CommunicationComponent = Communication;
@ -31,7 +33,7 @@ import Communication from 'newsletter_editor/components/communication';
'newsletter_editor/components/communication': {
getBulkTransformedPosts: mock
}
});
}).default;
model = new module.ALCSupervisor();
model.refresh();
@ -361,7 +363,7 @@ import Communication from 'newsletter_editor/components/communication';
return jQuery.Deferred();
}
}
});
}).default;
});
before(function () {