1
0
Эх сурвалжийг харах

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>
Julius Härtl 4 жил өмнө
parent
commit
e6e73b636f

+ 2 - 1
apps/accessibility/webpack.js

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

+ 2 - 1
apps/comments/webpack.js

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

+ 2 - 1
apps/files_sharing/webpack.js

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

+ 2 - 1
apps/files_trashbin/webpack.js

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

+ 2 - 1
apps/files_versions/webpack.js

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

+ 2 - 1
apps/oauth2/webpack.js

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

+ 2 - 1
apps/systemtags/webpack.js

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

+ 2 - 1
apps/twofactor_backupcodes/webpack.js

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

+ 2 - 1
apps/updatenotification/webpack.js

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

+ 1 - 0
apps/workflowengine/webpack.js

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

+ 2 - 1
core/webpack.js

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

+ 2 - 1
settings/webpack.js

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