chore: keeps swc/register for playwright tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import getPort from 'get-port';
|
||||
import swcRegister from '@swc/register';
|
||||
import path from 'path';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import shelljs from 'shelljs';
|
||||
@@ -40,6 +41,19 @@ export async function initPayloadTest(options: Options): Promise<{ serverURL: st
|
||||
initOptions.express = express();
|
||||
}
|
||||
|
||||
swcRegister({
|
||||
sourceMaps: 'inline',
|
||||
jsc: {
|
||||
parser: {
|
||||
syntax: 'typescript',
|
||||
tsx: true,
|
||||
},
|
||||
},
|
||||
module: {
|
||||
type: 'commonjs',
|
||||
},
|
||||
});
|
||||
|
||||
await payload.init(initOptions);
|
||||
|
||||
if (initOptions.express) {
|
||||
|
||||
Reference in New Issue
Block a user