Use different jsonpFunction

This avoids issues when multiple entrypoints try to asynchronously load chunks on the same page

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-09-03 10:55:06 +02:00
parent 1a7310f4b3
commit e6e73b636f
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
12 changed files with 23 additions and 11 deletions

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'accessibility.js' filename: 'accessibility.js',
jsonpFunction: 'webpackJsonpAccessibility'
} }
} }

View File

@ -5,7 +5,8 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'comments.js' filename: 'comments.js',
jsonpFunction: 'webpackJsonpComments'
}, },
externals: { externals: {
jquery: 'jQuery' jquery: 'jQuery'

View File

@ -10,6 +10,7 @@ module.exports = {
path: path.resolve(__dirname, './js/dist/'), path: path.resolve(__dirname, './js/dist/'),
publicPath: '/js/', publicPath: '/js/',
filename: '[name].js', filename: '[name].js',
chunkFilename: 'files_sharing.[id].js?v=[chunkhash]' chunkFilename: 'files_sharing.[id].js?v=[chunkhash]',
jsonpFunction: 'webpackJsonpFilesSharing'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'files_trashbin.js' filename: 'files_trashbin.js',
jsonpFunction: 'webpackJsonpFilesTrashbin'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, 'js'), path: path.resolve(__dirname, 'js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'files_versions.js' filename: 'files_versions.js',
jsonpFunction: 'webpackJsonpFilesVersions'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js', publicPath: '/js',
filename: 'oauth2.js' filename: 'oauth2.js',
jsonpFunction: 'webpackJsonpOauth'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'systemtags.js' filename: 'systemtags.js',
jsonpFunction: 'webpackJsonpSystemtags'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, 'js'), path: path.resolve(__dirname, 'js'),
publicPath: '/js', publicPath: '/js',
filename: 'settings.js' filename: 'settings.js',
jsonpFunction: 'webpackJsonpTwofactorBackupcodes'
} }
} }

View File

@ -5,6 +5,7 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'updatenotification.js' filename: 'updatenotification.js',
jsonpFunction: 'webpackJsonpUpdatenotification'
} }
} }

View File

@ -6,6 +6,7 @@ module.exports = {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/js/', publicPath: '/js/',
filename: 'workflowengine.js', filename: 'workflowengine.js',
jsonpFunction: 'webpackJsonpWorkflowengine'
}, },
module: { module: {
rules: [ rules: [

View File

@ -10,7 +10,8 @@ module.exports = [
}, },
output: { output: {
filename: '[name].js', filename: '[name].js',
path: path.resolve(__dirname, 'js/dist') path: path.resolve(__dirname, 'js/dist'),
jsonpFunction: 'webpackJsonpCore'
}, },
module: { module: {
rules: [ rules: [

View File

@ -9,7 +9,8 @@ module.exports = {
output: { output: {
path: path.resolve(__dirname, './js'), path: path.resolve(__dirname, './js'),
publicPath: '/', publicPath: '/',
filename: 'vue-[name].js?v=[chunkhash]' filename: 'vue-[name].js?v=[chunkhash]',
jsonpFunction: 'webpackJsonpSettings'
}, },
optimization: { optimization: {
splitChunks: { splitChunks: {