mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +02:00
feat(v2): Allow customization of js loader, replace babel by esbuild in Docusaurus website (#4766)
* feat(v2): Allow customization of js loader
* Change API
* use esbuild for Docusaurus website
* Enable isolatedModules: true
* Revert "Enable isolatedModules: true"
This reverts commit e656c350
Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
c8812cf3b5
commit
3548686f59
12 changed files with 113 additions and 11 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue