diff --git a/README.md b/README.md index e25dfcdf..bab76e78 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Then just run `npm run build`, or `pnpm build` / `yarn build` if you're using th - Output (`-o `): Specify output filename. - Format (`-f `): Set output format (default: `'esm'`). - External (`--external `): Specifying extra external dependencies, by default it is the list of `dependencies` and `peerDependencies` from `package.json`. Values are separate by comma. -- Target (`--target `): Set ECMAScript target (default: `'es2016'`). +- Target (`--target `): Set ECMAScript target (default: `'es2015'`). - Runtime (`--runtime `): Set build runtime (default: `'browser'`). - Environment (`--env `): Define environment variables. (default: `NODE_ENV`, separate by comma) - Working Directory (`--cwd `): Set current working directory where containing `package.json`. @@ -308,7 +308,7 @@ await bundle(path.resolve('./src/index.ts'), { sourcemap: false, // Boolean external: [], // string[] format: 'esm', // 'esm' | 'cjs' - target: 'es2016', // ES syntax target + target: 'es2015', // ES syntax target runtime: 'nodejs', // 'browser' | 'nodejs' cwd: process.cwd(), // string }) diff --git a/src/cli.ts b/src/cli.ts index e776d0a2..c6495576 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -20,7 +20,7 @@ Options: -h, --help output usage information --external specify an external dependency, separate by comma --no-external do not bundle external dependencies - --target js features target: swc target es versions. default: es2016 + --target js features target: swc target es versions. default: es2015 --runtime build runtime (nodejs, browser). default: browser --env inlined process env variables, separate by comma. default: NODE_ENV --cwd specify current working directory diff --git a/test/typing.test.ts b/test/typing.test.ts index 1552a369..110f3e4e 100644 --- a/test/typing.test.ts +++ b/test/typing.test.ts @@ -10,7 +10,7 @@ describe('types', () => { sourcemap: false, external: [], format: 'esm', - target: 'es2016', + target: 'es2015', runtime: 'nodejs', }