I am trying to generate critical css path using node module by addy osmania (https://github.com/addyosmani/critical)
i have below code in package json
"scripts": {
"criticalcss": "node criticalcss.mjs",
}
when i do npm run critical i get bellow error...
npm ERR! Missing script: "critical"
What am i doing wrong? My node installation is in c:user/admin and my production files are in xampp htdocs
CodePudding user response:
i used node script.mjs
and it worked
CodePudding user response:
Your script is named criticalcss
and you are running the command npm run critical
.
Try
npm run criticalcss