update pack-up node versions

This commit is contained in:
Ben Irvin 2023-10-17 16:38:34 +02:00
parent 3fab19a9a4
commit 79f24e9f2b
2 changed files with 4 additions and 4 deletions

View File

@ -86,9 +86,9 @@ The command sequence can be visualised as follows:
There are three different runtimes available for plugins:
- `node` which equates to a `node16` target
- `node` which equates to a `node18` target
- `web` which equates to a `esnext` target
- `*` (universal) which equates to `["last 3 major versions", "Firefox ESR", "last 2 Opera versions", "not dead", "node 16.0.0"]`
- `*` (universal) which equates to `["last 3 major versions", "Firefox ESR", "last 2 Opera versions", "not dead", "node 18.0.0"]`
The `node` and `web` targets are specifically used for the export maps with they keys `./strapi-server` and `./strapi-admin` respectively.
Any other export map values will be transpiled to the universal target. The universal target can be overwritten by adding the `browserslist`

View File

@ -48,7 +48,7 @@ const DEFAULT_BROWSERS_LIST_CONFIG = [
'Firefox ESR',
'last 2 Opera versions',
'not dead',
'node 16.0.0',
'node 18.0.0',
];
/**
@ -71,7 +71,7 @@ const createBuildContext = async ({
const targets = {
'*': browserslistToEsbuild(pkg.browserslist ?? DEFAULT_BROWSERS_LIST_CONFIG),
node: browserslistToEsbuild(['node 16.0.0']),
node: browserslistToEsbuild(['node 18.0.0']),
web: ['esnext'],
};