bunchee 6.5.1 → 6.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/cli.js CHANGED
@@ -646,7 +646,7 @@ function lint$1(pkg) {
646
646
  }
647
647
  }
648
648
 
649
- var version = "6.5.1";
649
+ var version = "6.5.2";
650
650
 
651
651
  async function writeDefaultTsconfig(tsConfigPath) {
652
652
  await fs.promises.writeFile(tsConfigPath, JSON.stringify(DEFAULT_TS_CONFIG, null, 2), 'utf-8');
package/dist/index.js CHANGED
@@ -1865,9 +1865,12 @@ async function createAssetRollupJobs(options, buildContext, bundleJobOptions) {
1865
1865
  isFromCli
1866
1866
  }) : [];
1867
1867
  const allConfigs = assetsConfigs.concat(typesConfigs);
1868
- for (const config of allConfigs){
1869
- if (options.clean && !isFromCli) {
1870
- await removeOutputDir(config.output, buildContext.cwd);
1868
+ // When it's production build (non watch mode), we need to remove the output directory
1869
+ if (!options.watch) {
1870
+ for (const config of allConfigs){
1871
+ if (options.clean && !isFromCli) {
1872
+ await removeOutputDir(config.output, buildContext.cwd);
1873
+ }
1871
1874
  }
1872
1875
  }
1873
1876
  const rollupJobs = allConfigs.map((rollupConfig)=>bundleOrWatch(options, rollupConfig));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunchee",
3
- "version": "6.5.1",
3
+ "version": "6.5.2",
4
4
  "description": "zero config bundler for js/ts/jsx libraries",
5
5
  "bin": "./dist/bin/cli.js",
6
6
  "main": "./dist/index.js",