diff --git a/Dockerfile b/Dockerfile index e46ff98e..0c2ab7aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ RUN echo "Builder Success 🎉" FROM nginx:stable-alpine as production +RUN echo "types { application/javascript js mjs; }" > /etc/nginx/conf.d/mjs.conf COPY --from=builder /app/apps/antd-view/dist /usr/share/nginx/html COPY ./deploy/nginx.conf /etc/nginx/nginx.conf diff --git a/internal/vite-config/src/plugins/license.ts b/internal/vite-config/src/plugins/license.ts index aa5e7361..eefef290 100644 --- a/internal/vite-config/src/plugins/license.ts +++ b/internal/vite-config/src/plugins/license.ts @@ -1,6 +1,5 @@ import type { NormalizedOutputOptions, - OutputAsset, OutputBundle, OutputChunk, } from 'rollup'; @@ -45,25 +44,14 @@ async function viteLicensePlugin( `.trim(); for (const [, fileContent] of Object.entries(bundle)) { - if ( - fileContent.type === 'asset' || - (fileContent.type === 'chunk' && fileContent.isEntry) - ) { + if (fileContent.type === 'chunk' && fileContent.isEntry) { const chunkContent = fileContent as OutputChunk; - const assetContent = fileContent as OutputAsset; // 插入版权信息 - const content = - typeof assetContent.source === 'string' - ? assetContent.source - : chunkContent.code; + const content = chunkContent.code; const updatedContent = `${copyrightText}${EOL}${content}`; // 更新bundle - if (assetContent.source === undefined) { - (fileContent as OutputChunk).code = updatedContent; - } else { - (fileContent as OutputAsset).source = updatedContent; - } + (fileContent as OutputChunk).code = updatedContent; } } }, diff --git a/packages/business/layouts/src/basic/content/content.vue b/packages/business/layouts/src/basic/content/content.vue index 44eaef20..2e279d36 100644 --- a/packages/business/layouts/src/basic/content/content.vue +++ b/packages/business/layouts/src/basic/content/content.vue @@ -12,7 +12,7 @@ defineOptions({ name: 'LayoutContent' }); const { keepAlive } = usePreferences(); const tabsStore = useTabsStore(); -const { onTransitionEnd, spinning } = useContentSpinner(); +const { spinning } = useContentSpinner(); const { getCacheTabs, getExcludeTabs, renderRouteView } = storeToRefs(tabsStore); @@ -51,12 +51,7 @@ function getTransitionName(route: RouteLocationNormalizedLoaded) { /> - +