Skip to content

Commit

Permalink
add patchpackage.cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFerraro committed May 5, 2024
1 parent 89d05df commit e978479
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "turbo run lint",
"format": "turbo run format",
"build:wasm:dev": "wasm-pack build --target web packages/cadmium --dev --no-typescript",
"build:wasm": "wasm-pack build --target web packages/cadmium"
"build:wasm": "wasm-pack build --target web packages/cadmium && ./packages/cadmium/patchpackage.cjs"
},
"devDependencies": {
"@playwright/test": "^1.42.1",
Expand Down
10 changes: 10 additions & 0 deletions packages/cadmium/patchpackage.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env node

const packagejson = require("./pkg/package.json");
const { writeFileSync } = require("fs");
const { join } = require("path");

writeFileSync(
join(__dirname, "pkg", "package.json"),
JSON.stringify({ ...packagejson, type: "module" }, null, 2)
);

0 comments on commit e978479

Please sign in to comment.