We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e67b241 commit fed3366Copy full SHA for fed3366
rosidl_gen/idl_generator.js
@@ -43,8 +43,14 @@ function removeEmptyLines(str) {
43
async function writeGeneratedCode(dir, fileName, code) {
44
let result = null;
45
if (!isDebug && fileName.endsWith('.js')) {
46
- result = await minify(code);
+ try {
47
+ result = await minify(code);
48
+ } catch (error) {
49
+ console.error(`Error minifying ${fileName}:`, error);
50
+ result = null;
51
+ }
52
}
53
+
54
await fse.mkdirs(dir);
55
await fse.writeFile(path.join(dir, fileName), result ? result.code : code);
56
0 commit comments