use esbuild for Docusaurus website

This commit is contained in:
slorber 2021-05-13 17:59:46 +02:00
parent 11e9aad800
commit 848621e079
4 changed files with 44 additions and 5 deletions

View file

@ -63,6 +63,16 @@ const isVersioningDisabled = !!process.env.DISABLE_VERSIONING || isI18nStaging;
: // Production locales
['en', 'fr', 'ko', 'zh-CN'],
},
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('esbuild-loader'),
options: {
loader: 'tsx',
format: isServer ? 'cjs' : undefined,
target: isServer ? 'node12' : 'es2017',
},
}),
},
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/docusaurus.ico',