Procházet zdrojové kódy

fix(ModalManager): Dynamic import requires file extension to be defined

Owen Diffey před 2 roky
rodič
revize
2c08b91d59
1 změnil soubory, kde provedl 20 přidání a 20 odebrání
  1. 20 20
      frontend/src/components/ModalManager.vue

+ 20 - 20
frontend/src/components/ModalManager.vue

@@ -10,7 +10,7 @@ const useModalComponents = (map: { [key: string]: string }) => {
 	const modalComponents: { [key: string]: string } = {};
 	Object.entries(map).forEach(([mapKey, mapValue]) => {
 		modalComponents[mapKey] = defineAsyncComponent(
-			() => import(`./modals/${mapValue}`)
+			() => import(`./modals/${mapValue}.vue`)
 		);
 	});
 	return modalComponents;
@@ -18,25 +18,25 @@ const useModalComponents = (map: { [key: string]: string }) => {
 
 const modalComponents = shallowRef(
 	useModalComponents({
-		editUser: "EditUser.vue",
-		login: "Login.vue",
-		register: "Register.vue",
-		whatIsNew: "WhatIsNew.vue",
-		createStation: "CreateStation.vue",
-		editNews: "EditNews.vue",
-		manageStation: "ManageStation/index.vue",
-		editPlaylist: "EditPlaylist/index.vue",
-		createPlaylist: "CreatePlaylist.vue",
-		report: "Report.vue",
-		viewReport: "ViewReport.vue",
-		bulkActions: "BulkActions.vue",
-		viewApiRequest: "ViewApiRequest.vue",
-		viewPunishment: "ViewPunishment.vue",
-		removeAccount: "RemoveAccount.vue",
-		importAlbum: "ImportAlbum.vue",
-		confirm: "Confirm.vue",
-		editSong: "EditSong/index.vue",
-		viewYoutubeVideo: "ViewYoutubeVideo.vue"
+		editUser: "EditUser",
+		login: "Login",
+		register: "Register",
+		whatIsNew: "WhatIsNew",
+		createStation: "CreateStation",
+		editNews: "EditNews",
+		manageStation: "ManageStation/index",
+		editPlaylist: "EditPlaylist/index",
+		createPlaylist: "CreatePlaylist",
+		report: "Report",
+		viewReport: "ViewReport",
+		bulkActions: "BulkActions",
+		viewApiRequest: "ViewApiRequest",
+		viewPunishment: "ViewPunishment",
+		removeAccount: "RemoveAccount",
+		importAlbum: "ImportAlbum",
+		confirm: "Confirm",
+		editSong: "EditSong/index",
+		viewYoutubeVideo: "ViewYoutubeVideo"
 	})
 );
 </script>