Add workaround fix for Webpack 4 & Premium plugin
We need this until https://github.com/webpack/webpack/pull/8614 is merged into Webpack. [MAILPOET-1667]
This commit is contained in:
@ -72,6 +72,7 @@ jQuery('.toplevel_page_mailpoet-newsletters.menu-top-last')
|
|||||||
<% block after_translations %><% endblock %>
|
<% block after_translations %><% endblock %>
|
||||||
|
|
||||||
<%= javascript(
|
<%= javascript(
|
||||||
|
'admin_vendor_chunk.js',
|
||||||
'admin_vendor.js'
|
'admin_vendor.js'
|
||||||
)%>
|
)%>
|
||||||
|
|
||||||
|
@ -275,10 +275,22 @@ const adminConfig = {
|
|||||||
priority: 1,
|
priority: 1,
|
||||||
enforce: true,
|
enforce: true,
|
||||||
},
|
},
|
||||||
admin_vendor: {
|
admin_vendor_chunk: {
|
||||||
name: 'admin_vendor',
|
name: 'admin_vendor_chunk',
|
||||||
|
test: (module, chunks) => {
|
||||||
|
// add all modules from 'admin_vendor' entrypoint
|
||||||
|
if (chunks.some((chunk) => chunk.name === 'admin_vendor')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// add admin/form_editor/newsletter_editor shared modules
|
||||||
|
const filteredChunks = chunks.filter((chunk) => {
|
||||||
|
return ['admin', 'form_editor', 'newsletter_editor'].includes(chunk.name);
|
||||||
|
});
|
||||||
|
return filteredChunks.length > 1;
|
||||||
|
},
|
||||||
|
enforce: true,
|
||||||
chunks: (chunk) => ['admin_vendor', 'admin', 'form_editor', 'newsletter_editor'].includes(chunk.name),
|
chunks: (chunk) => ['admin_vendor', 'admin', 'form_editor', 'newsletter_editor'].includes(chunk.name),
|
||||||
minChunks: 2,
|
|
||||||
priority: 0,
|
priority: 0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user