chore: migrate Jest and website to SWC (#6944)

* chore: migrate Jest and website to SWC

* ignore template
This commit is contained in:
Joshua Chen 2022-03-19 20:56:30 +08:00 committed by GitHub
parent 53f152c42d
commit 19942f990a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 134 additions and 186 deletions

View file

@ -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',
}
},
}),
},