Skip to content

Commit

Permalink
fix: dynamic import of fs module
Browse files Browse the repository at this point in the history
  • Loading branch information
shakkernerd committed Dec 14, 2024
1 parent e8ea5db commit d5c8b43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/client-slack/src/examples/standalone-attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ async function runExample() {

// Create a test file
const testFilePath = path.join(__dirname, "test.txt");
const fs = require("fs");
async function loadFs() {
return await import("fs");
}
const fs = await loadFs();
fs.writeFileSync(
testFilePath,
"This is a test file content for attachment testing."
Expand Down

0 comments on commit d5c8b43

Please sign in to comment.