mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-31 07:18:59 +02:00
chore: migrate Jest and website to SWC (#6944)
* chore: migrate Jest and website to SWC * ignore template
This commit is contained in:
parent
53f152c42d
commit
19942f990a
9 changed files with 134 additions and 186 deletions
|
@ -94,10 +94,18 @@ const config = {
|
|||
},
|
||||
webpack: {
|
||||
jsLoader: (isServer) => ({
|
||||
loader: require.resolve('esbuild-loader'),
|
||||
loader: require.resolve('swc-loader'),
|
||||
options: {
|
||||
loader: 'tsx',
|
||||
target: isServer ? 'node12' : 'es2017',
|
||||
jsc: {
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"tsx": true
|
||||
},
|
||||
target: 'es2017',
|
||||
},
|
||||
module: {
|
||||
type: isServer ? 'commonjs' : 'es6',
|
||||
}
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue