Remove no longer supported import syntax, use CommonJS for tests instead
Using inject-loader requires first transpiling modules to CommonJS. Previously, we were doing this via parametrized imports, but these are no longer supported. Instead, we can fix this by using CommonJS preset in Webpack config. [MAILPOET-5491]
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
/* (ES6 -> CommonJS transform needed for inject-loader) */
|
||||
/* eslint-disable-next-line max-len */
|
||||
import CommunicationInjector from 'inject-loader!babel-loader?plugins[]=@babel/plugin-transform-modules-commonjs!newsletter-editor/components/communication';
|
||||
import CommunicationInjector from 'inject-loader!newsletter-editor/components/communication';
|
||||
|
||||
const expect = global.expect;
|
||||
const jQuery = global.jQuery;
|
||||
|
Reference in New Issue
Block a user