From 031ea8efed6979cb01d0a7857cea6aa27270ceb7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 25 Feb 2021 15:00:43 +0100 Subject: [PATCH] Use named chunk for embed on analyze --- client/webpack/webpack.video-embed.js | 6 +++++- server/middlewares/validators/videos/videos.ts | 2 +- server/models/account/user.ts | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index ef17deeb6..7de63adfc 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -40,7 +40,11 @@ module.exports = function () { : '[name].[hash].bundle.js', sourceMapFilename: '[file].map', - chunkFilename: '[id].[hash].chunk.js', + + chunkFilename: process.env.ANALYZE_BUNDLE === 'true' + ? '[name].chunk.js' + : '[id].[hash].chunk.js', + publicPath: '/client/standalone/videos/' }, diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index d51c86972..37cc07b94 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts @@ -3,7 +3,7 @@ import { body, param, query, ValidationChain } from 'express-validator' import { isAbleToUploadVideo } from '@server/lib/user' import { getServerActor } from '@server/models/application/application' import { ExpressPromiseHandler } from '@server/types/express' -import { MVideoFullLight, MVideoWithRights } from '@server/types/models' +import { MVideoWithRights } from '@server/types/models' import { ServerErrorCode, UserRight, VideoChangeOwnershipStatus, VideoPrivacy } from '../../../../shared' import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' import { VideoChangeOwnershipAccept } from '../../../../shared/models/videos/video-change-ownership-accept.model' diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 0834ecfa5..c1f22b76a 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -28,7 +28,6 @@ import { MUserFormattable, MUserNotifSettingChannelDefault, MUserWithNotificationSetting, - MVideoFullLight, MVideoWithRights } from '@server/types/models' import { hasUserRight, USER_ROLE_LABELS } from '../../../shared/core-utils/users'