Comparing version 3.2.0 to 3.3.0
@@ -27,3 +27,3 @@ #!/usr/bin/env node | ||
default: "es2017" | ||
}).option("--dts", "Generate declaration file").option("--watch", "Watch mode").option("--define.* <value>", "Define compile-time constants").option("--external <name>", "Mark specific packages as external").option("--global-name <name>", "Global variable name for iife format").option("--jsxFactory <jsxFactory>", "Name of JSX factory function", { | ||
}).option("--legacy-output", "Output different formats to different folder instead of using different extensions").option("--dts", "Generate declaration file").option("--watch", "Watch mode").option("--define.* <value>", "Define compile-time constants").option("--external <name>", "Mark specific packages as external").option("--global-name <name>", "Global variable name for iife format").option("--jsxFactory <jsxFactory>", "Name of JSX factory function", { | ||
default: "React.createElement" | ||
@@ -30,0 +30,0 @@ }).option("--jsxFragment <jsxFragment>", "Name of JSX fragment function", { |
@@ -7,2 +7,6 @@ import { BuildResult } from 'esbuild'; | ||
/** | ||
* Output different formats to differen folder instead of using different extensions | ||
*/ | ||
legacyOutput?: boolean; | ||
/** | ||
* Compile target, like `es2018` | ||
@@ -9,0 +13,0 @@ */ |
{ | ||
"name": "tsup", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"main": "dist/index.js", | ||
@@ -46,5 +46,5 @@ "bin": "dist/cli.js", | ||
"ts-jest": "^26.1.3", | ||
"tsup": "^3.0.0", | ||
"tsup": "^3.2.0", | ||
"typescript": "^3.9.7" | ||
} | ||
} |
@@ -57,3 +57,3 @@ # tsup | ||
You can bundle in multiple format in one go: | ||
You can bundle in multiple formats in one go: | ||
@@ -84,2 +84,19 @@ ```bash | ||
If you don't want to extensions like `.mjs` or `.cjs`, e.g. you want your library to be used in a bundler (environment) that doesn't support those, you can enable `--legacy-output` flag: | ||
```bash | ||
tsup src/index.ts --format esm,cjs,iife --legacy-output | ||
``` | ||
..which outputs to: | ||
```bash | ||
dist | ||
├── esm | ||
│ └── index.js | ||
├── iife | ||
│ └── index.js | ||
└── index.js | ||
``` | ||
### ES5 support | ||
@@ -86,0 +103,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16679
127
574651