2022-03-12 13:43:54 +00:00
|
|
|
import * as plugins from './plugins.js';
|
|
|
|
import type { CompilerOptions } from 'typescript';
|
|
|
|
|
|
|
|
const defaultTsNodeOptions: plugins.tsNode.CreateOptions = {
|
|
|
|
compilerOptions: {
|
|
|
|
lib: ['dom'],
|
2022-03-24 17:47:16 +00:00
|
|
|
target: <any>'es2022', // Script Target should be a string -> 2 is for ES2015
|
2022-03-12 13:43:54 +00:00
|
|
|
experimentalDecorators: true,
|
2022-03-24 17:47:16 +00:00
|
|
|
useDefineForClassFields: false,
|
2022-03-12 13:43:54 +00:00
|
|
|
esModuleInterop: true,
|
|
|
|
strictNullChecks: false,
|
|
|
|
moduleResolution: <any>'node12',
|
|
|
|
module: <any>'ESNext',
|
|
|
|
importsNotUsedAsValues: <any>'preserve',
|
|
|
|
} as CompilerOptions,
|
|
|
|
esm: true,
|
|
|
|
skipIgnore: true,
|
|
|
|
transpileOnly: true
|
|
|
|
};
|
|
|
|
|
|
|
|
export const { resolve, load, getFormat, transformSource } = plugins.tsNode.createEsmHooks(plugins.tsNode.register(defaultTsNodeOptions)) as any;
|