Closed adamkdean closed 3 months ago
Just as I post the ticket after hammering my head at this for days, I realise, you use pkg .
to make use of the package.json config. Wasn't entirely clear to me. Perhaps we could improve the README? (Happy to do it.)
@adamkdean Feel free to open a PR
What version of pkg are you using?
5.11.5
What version of Node.js are you using?
20.11.0
What operating system are you using?
macOS
What CPU architecture are you using?
Apple M3 Max (arm64)
What Node versions, OSs and CPU architectures are you building for?
node20
Describe the Bug
I'm trying to get pkg to build with sharp but running into issues.
// package.json
Not only does the install for sharp not seem to work (separate issue I think) but the targets are ignored.
It almost seems like targets are assume prior to package.json being read?
(Or I could just be doing something wrong!)
Expected Behavior
Pkg should read the package.json file and parse the targets.
To Reproduce
Use:
The src/test.js just has a console.log in it, nothing more. The targets can be changed for others but makes no difference.