Skip to content

Commit 11ab9a3

Browse files
authored
Fix build error for easm sdk (#8031)
* Fix build error for easm sdk * update
1 parent bb98c07 commit 11ab9a3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tools/js-sdk-release-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure-tools/js-sdk-release-tools",
3-
"version": "2.7.4",
3+
"version": "2.7.5",
44
"description": "",
55
"scripts": {
66
"start": "node dist/changelogToolCli.js",

tools/js-sdk-release-tools/src/utils/changeConfigOfTestAndSample.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ export function changeConfigOfTestAndSample(packagePath: string, mode: ChangeMod
3131
tsConfig = JSON.parse(tsConfigFile);
3232
packageJson = JSON.parse(packageJsonFile);
3333
apiExtractor = JSON.parse(apiExtractorFile);
34-
const isModular = packageJson["exports"] !== undefined && sdkType === SdkType.Rlc;
3534
tsConfig['include'] = ["./src/**/*.ts"];
36-
// Only update other files for HLC and pure RLC not Modular
37-
if(!isModular) {
35+
const isEsm = packageJson["type"] === "module";
36+
// Only update other files for common JS packages
37+
if(!isEsm) {
3838
packageJson['module'] = "./dist-esm/index.js";
3939
if (sdkType === SdkType.Hlc) {
4040
apiExtractor['mainEntryPointFilePath'] = "./dist-esm/index.d.ts";

0 commit comments

Comments
 (0)