diff --git a/packages/javascript/package.json b/packages/javascript/package.json index 06c81065..8abee212 100644 --- a/packages/javascript/package.json +++ b/packages/javascript/package.json @@ -24,8 +24,8 @@ "generate:version:esm": "genversion --esm --semi src/gen/esm/version.js", "generate:version:cjs": "genversion --semi src/gen/cjs/version.js", "generate:version": "pnpm generate:version:esm && pnpm generate:version:cjs", - "generate:proto:esm": "protoc --es_out src/gen/esm --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto", - "generate:proto:cjs": "protoc --es_out src/gen/cjs --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto", + "generate:proto:esm": "mkdir -p src/gen/esm && protoc --es_out src/gen/esm --es_opt target=js -I=../../protobufs ../../protobufs/livekit_*.proto", + "generate:proto:cjs": "mkdir -p src/gen/cjs && protoc --es_out src/gen/cjs --es_opt target=js,js_import_style=legacy_commonjs -I=../../protobufs ../../protobufs/livekit_*.proto", "generate:proto:dts": "protoc --es_out src/gen/dts --es_opt target=dts -I=../../protobufs ../../protobufs/livekit_*.proto", "generate:proto": "pnpm generate:proto:esm && pnpm generate:proto:cjs && pnpm generate:proto:dts", "build": "pnpm generate:version && pnpm generate:proto"