Skip to content

Commit 68324c2

Browse files
committed
Webpack 5 fix
1 parent 4d93fda commit 68324c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webpack.config.prod.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
filename: 'webviewer-ui.min.js',
2020
chunkFilename: 'chunks/[name].chunk.js',
2121
publicPath: './',
22-
jsonpFunction: 'webpackJsonpWebViewerUI',
22+
chunkLoadingGlobal: 'webpackJsonpWebViewerUI',
2323
},
2424
plugins: [
2525
new CopyWebpackPlugin([
@@ -85,7 +85,7 @@ module.exports = {
8585
},
8686
},
8787
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'node_modules')],
88-
exclude: function(modulePath) {
88+
exclude: function (modulePath) {
8989
return /node_modules/.test(modulePath) &&
9090
!(/node_modules[\\/](react-dnd|react-quill-new|quill-mention|quill)[\\/]/.test(modulePath));
9191
},
@@ -96,7 +96,7 @@ module.exports = {
9696
{
9797
loader: 'style-loader',
9898
options: {
99-
insert: function(styleTag) {
99+
insert: function (styleTag) {
100100
function findNestedWebComponents(tagName, root = document) {
101101
const elements = [];
102102

@@ -130,7 +130,7 @@ module.exports = {
130130
const webComponent = webComponents[i];
131131
if (i === 0) {
132132
webComponent.shadowRoot.appendChild(styleTag);
133-
styleTag.onload = function() {
133+
styleTag.onload = function () {
134134
if (clonedStyleTags.length > 0) {
135135
clonedStyleTags.forEach((styleNode) => {
136136
// eslint-disable-next-line no-unsanitized/property

0 commit comments

Comments
 (0)