Skip to content

Commit e217513

Browse files
committed
Small optimisations
1 parent 9e83bdc commit e217513

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/demos-inject-local.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ workspacePackages.forEach((pkg) => {
2222
const PNPMFILE_CJS = `const fs = require("fs");
2323
const path = require("path");
2424
25+
const localPaths = ${JSON.stringify(packagePaths)};
26+
const getLocalPath = (name) => localPaths[name];
27+
2528
module.exports = {
2629
hooks: {
2730
readPackage(pkg) {
28-
const localPaths = ${JSON.stringify(packagePaths)};
29-
const getLocalPath = (name) => localPaths[name];
30-
3131
const injectPeers = (manifestPath) => {
3232
try {
3333
const content = fs.readFileSync(manifestPath, "utf-8");

0 commit comments

Comments
 (0)