-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
What is the reason for fixing the target to node20 in optimize?
cli/src/commands/optimize/index.ts
Line 84 in a0e00dc
| target: 'node20', |
For example, there seems to be a difference in the build results when the target is node20 and deno1.
So I think it would be good to default to node20 as the optimized version, but allow the user to specify it using a command line argument ?
Acceptable targets are debatable
- only node and deno LTS version ?
- all node and deno version ?
- in this case, How do we treat
esmandcjs
- in this case, How do we treat
Image of implementation
Define type OPTIMIZE_TARGET
const OPTIMIZE_TARGETS = ['deno1', 'deno2', 'node20', 'node22', 'node24'] as const
type OPTIMIZE_TARGET = (typeof OPTIMIZE_TARGETS)[number]Add -t --target option.
.option('-t, --target [target]', `target platform (${OPTIMIZE_TARGETS.join(', ')})`, (value) => {
// validation
})Metadata
Metadata
Assignees
Labels
No labels