Skip to content

Commit

Permalink
Merge pull request #3 from seokju-na/fix/supports-nodejs12
Browse files Browse the repository at this point in the history
Replace nullish coalescing operator with default function parameters
  • Loading branch information
thomaschaaf authored May 28, 2021
2 parents 981cf55 + 448005c commit 1828759
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ const theFinder = new RegExp(
const findDecorators = (fileContent) =>
theFinder.test(stripComments(fileContent));

const esbuildPluginTsc = (options = {}) => ({
const esbuildPluginTsc = ({
tsconfigPath = path.join(process.cwd(), './tsconfig.json'),
force: forceTsc = false,
tsx = true,
} = {}) => ({
name: 'tsc',
setup(build) {
const tsconfigPath =
options.tsconfigPath ?? path.join(process.cwd(), './tsconfig.json');
const forceTsc = options.force ?? false;
const tsx = options.tsx ?? true;

let parsedTsConfig = null;

build.onLoad({ filter: tsx ? /\.tsx?$/ : /\.ts$/ }, async (args) => {
Expand Down

0 comments on commit 1828759

Please sign in to comment.