Skip to content

🎥 Make videos programmatically with React

Revert "Fix `@remotion/studio` packaging"

Jonny Burgera0172cc2ad1f
diff --git a/packages/.monorepo/builder.ts b/packages/.monorepo/builder.ts
index ecae3ff32a..37721e5e75 100644
--- a/packages/.monorepo/builder.ts
+++ b/packages/.monorepo/builder.ts
@@ -1,5 +1,4 @@
import {build} from 'bun';
-import {mkdirSync, rmdirSync} from 'fs';
import path from 'path';
import {Exports, validateExports} from './validate-exports';
@@ -113,10 +112,6 @@ export const buildPackage = async ({
continue;
} else if (action === 'use-tsc') {
} else if (action === 'build') {
- const folder = path.join(process.cwd(), 'dist', format);
- rmdirSync(folder, {recursive: true});
- mkdirSync(folder, {recursive: true});
-
for (const {path: p, target, splitting} of entrypoints) {
const externalFinal = filterExternal(getExternal(external));
validateExternal(externalFinal);
@@ -132,12 +127,9 @@ export const buildPackage = async ({
for (const file of output.outputs) {
const text = await file.text();
- const outputPath = path.join(
- folder,
- file.path.replace('.module.', '.'),
- );
+ const outputPath = `./${path.join('./dist', format, file.path.replace('.module.', '.'))}`;
- await Bun.write(outputPath, text);
+ await Bun.write(path.join(process.cwd(), outputPath), text);
if (text.includes('jonathanburger')) {
throw new Error('Absolute path was included, see ' + outputPath);