diff --git a/readme.md b/readme.md index f56d6987..d70a3cf8 100644 --- a/readme.md +++ b/readme.md @@ -63,10 +63,12 @@ Outputs the Node.js compact build of `input.js` into `dist/index.js`. -e, --external [mod] Skip bundling 'mod'. Can be used many times -q, --quiet Disable build summaries / non-error outputs -w, --watch Start a watched build + -t, --transpile-only Use transpileOnly option with the ts-loader --v8-cache Emit a build using the v8 compile cache --license [file] Adds a file containing licensing information to the output --stats-out [file] Emit webpack stats as json to the specified output file - --target [es2015|es2020] Select ecmascript target to use for output + --target [es] ECMAScript target to use for output (default: es2015) + Learn more: https://webpack.js.org/configuration/target ``` ### Execution Testing diff --git a/src/cli.js b/src/cli.js index 30d940fd..6e4a8e53 100755 --- a/src/cli.js +++ b/src/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -const { resolve, relative, dirname, sep, extname } = require("path"); +const { resolve, relative, dirname, sep } = require("path"); const glob = require("glob"); const shebangRegEx = require("./utils/shebang"); const rimraf = require("rimraf"); @@ -35,7 +35,8 @@ Options: --v8-cache Emit a build using the v8 compile cache --license [file] Adds a file containing licensing information to the output --stats-out [file] Emit webpack stats as json to the specified output file - --target What build target to use for webpack (default: es6) + --target [es] ECMAScript target to use for output (default: es2015) + Learn more: https://webpack.js.org/configuration/target `; // support an API mode for CLI testing diff --git a/src/index.js b/src/index.js index c79e9308..34639417 100644 --- a/src/index.js +++ b/src/index.js @@ -78,7 +78,7 @@ function ncc ( } if (target && !target.startsWith('es')) { - throw new Error(`Invalid "target" value provided ${target}, value must be es version e.g. es5`) + throw new Error(`Invalid "target" value provided ${target}, value must be es version e.g. es2015`) } const resolvedEntry = resolve.sync(entry);