Peter Mekhaeil

Use pnpm's shell-emulator to execute scripts on all platforms

pnpm can do cross-platform scripting when shell-emulator is enabled.

# .npmrc
shell-emulator=true

It means scripts like this will work across all platforms:

"scripts": {
  "serve": "NODE_ENV=production node server"
}

It is powered by @yarnpkg/shell and it replaces the need to use libraries like cross-env.

Learn More