Closed paveldhq closed 11 months ago
same issue. This not work. We can't debug snapshot? Just want to double check the file has been copy into snapshot
"assets": [
"node_modules/.prisma/client/*",
"build/**/*",
"public/**/*",
"dist/**/*"
],
Just want to put everything dist in the snapshot.
same issue. This not work. We can't debug snapshot? Just want to double check the file has been copy into snapshot↳
"assets": [ "node_modules/.prisma/client/*", "build/**/*", "public/**/*", "dist/**/*" ],
Just want to put everything dist in the snapshot.↳
It's worked for me. I think my code file reference has some errors.
What version of pkg are you using?
5.8.0
What version of Node.js are you using?
18.13.0
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
default
Describe the Bug
the config package requires a directory with yml files for configs. After packing with
pkg .
the build-in directory is not accessible.Expected Behavior
config
directory with contents is foundTo Reproduce
- Create a sample application using TypeScript
- Add config as dependency
- Add
... "pkg": { "targets": [ "node18-linux-x64", "node18-win-x64", "node18-macos-arm64" ], "scripts": "dist/**/*.js", "outputPath": "release", "assets": [ "config/*.yml" ] } ...
to package.json
You can use the code below as an alternative without set path in package.json/assets :
const { join } = require("node:path");
const { cwd } = require("node:process");
const { readFile } = require("node:fs/promises");
const pathFile = join(cwd(), "config.yml");
const getData = await readFile(pathFile, { encoding: "utf-8"});
getData; // parse this with package like yaml
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.
What version of pkg are you using?
5.8.0
What version of Node.js are you using?
18.13.0
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
default
Describe the Bug
the config package requires a directory with yml files for configs. After packing with
pkg .
the build-in directory is not accessible.Expected Behavior
config
directory with contents is foundTo Reproduce
to package.json