Skip to content

Commit

Permalink
fix: clean up unwanted log messages in the release binary
Browse files Browse the repository at this point in the history
  • Loading branch information
stefreak committed Nov 9, 2023
1 parent 10a0dc4 commit 39caba1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions garden-sea/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ where
// TODO: consider what happens when users also set the NODE_OPTIONS env var
format!("--max-semi-space-size={}", max_semi_space_size).into(),
format!("--max-old-space-size={}", max_old_space_size).into(),
// Disable deprecation warnings; We still see deprecation warnings during development, but in release binaries we want to hide them.
"--no-deprecation".into(),
// execute garden.mjs
path.join("rollup").join("garden.mjs").into(),
];
Expand Down
8 changes: 8 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ export default {
chunkFileNames: "[name]-[hash].mjs",
},
plugins: [
// Remove unwanted console.log in node-pty-prebuilt-multiarch package
replace({
include: [/node-pty-prebuilt-multiarch.*prebuild-file-path\.js$/],
values: {
"console.log('prebuild-file-path:', pathToBuild);": "// Removed console.log in rollup.config.js)",
},
delimiters: ["", ""],
}),
// Rewrite require calls to use the global require to import native modules.
{
name: "rewrite-native-require",
Expand Down

0 comments on commit 39caba1

Please sign in to comment.