/* * Copyright (c) 2024 Kristóf Marussy * * SPDX-License-Identifier: MIT */ import path from 'node:path'; import type { LoadContext, Plugin } from '@docusaurus/types'; export default function thirdPartyContentPlugin({ siteDir, }: LoadContext): Plugin { const thirdPartyDir = path.join(siteDir, 'third-party'); return { name: 'marussy-third-party-content-plugin', configureWebpack: () => ({ mergeStrategy: { 'resolve.alias.@site': 'replace', }, resolve: { alias: { '@site': [thirdPartyDir, siteDir], }, }, }), }; }