Skip to content

Commit

Permalink
get rid of esbuild plugin tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Feb 12, 2025
1 parent c36fc2a commit d59edea
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"cuzz": "^0.0.3",
"deep-is": "^0.1.4",
"esbuild": "^0.25.0",
"esbuild-plugin-tsc": "^0.4.0",
"ethers": "^6.13.5",
"fs-extra": "^11.3.0",
"glob": "^11.0.1",
Expand Down
5 changes: 1 addition & 4 deletions src/build/experimental/commands/compile/javascript.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { BuildOptions } from 'esbuild';
import esbuildPluginTsc from 'esbuild-plugin-tsc';
import { join } from 'path';

import {
bundle,
getBuildOptions as getStableBuildOptions,
getTsConfigPath,
handleClassApiCanister
} from '../../../stable/commands/compile/javascript';
import { AZLE_PACKAGE_PATH } from '../../../stable/utils/global_paths';
Expand Down Expand Up @@ -188,7 +186,6 @@ export function getBuildOptions(
https: join(customJsModulesPath, 'https.ts'),
...esmAliases
},
external: [...externalImplemented, ...externalNotImplemented],
plugins: [esbuildPluginTsc({ tsconfigPath: getTsConfigPath() })]
external: [...externalImplemented, ...externalNotImplemented]
};
}
15 changes: 1 addition & 14 deletions src/build/stable/commands/compile/javascript.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { build, BuildOptions } from 'esbuild';
import esbuildPluginTsc from 'esbuild-plugin-tsc';
import { existsSync } from 'fs';
import { join } from 'path';

import { AZLE_PACKAGE_PATH } from '../../utils/global_paths';

export async function compile(main: string): Promise<string> {
const prelude = getPrelude(main);
Expand Down Expand Up @@ -148,19 +143,11 @@ export function getBuildOptions(ts: string): BuildOptions {
}
);
}
},
esbuildPluginTsc({ tsconfigPath: getTsConfigPath() })
}
]
};
}

export function getTsConfigPath(): string {
if (existsSync('tsconfig.json')) {
return 'tsconfig.json';
}
return join(AZLE_PACKAGE_PATH, 'tsconfig.json');
}

function experimentalMessage(importName: string): string {
return `Experimental mode must be enabled to import from ${importName}. You can enable experimental mode in your dfx.json file like this:
{
Expand Down

0 comments on commit d59edea

Please sign in to comment.