bunchee 4.4.6 → 4.4.7
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 +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1179,6 +1179,7 @@ async function buildOutputConfigs(entry, bundleConfig, exportCondition, buildCon
|
|
|
1179
1179
|
// Add esm mark and interop helper if esm export is detected
|
|
1180
1180
|
const useEsModuleMark = hasEsmExport(exportPaths, tsCompilerOptions);
|
|
1181
1181
|
const absoluteOutputFile = path.resolve(cwd, bundleConfig.file);
|
|
1182
|
+
const outputFileExtension = path.extname(absoluteOutputFile);
|
|
1182
1183
|
const name = filePathWithoutExtension(absoluteOutputFile);
|
|
1183
1184
|
var _exportCondition_export_types;
|
|
1184
1185
|
const dtsFile = path.resolve(cwd, dts ? bundleConfig.file : (_exportCondition_export_types = exportCondition.export.types) != null ? _exportCondition_export_types : getExportFileTypePath(bundleConfig.file));
|
|
@@ -1198,7 +1199,10 @@ async function buildOutputConfigs(entry, bundleConfig, exportCondition, buildCon
|
|
|
1198
1199
|
strict: false,
|
|
1199
1200
|
sourcemap: bundleConfig.sourcemap,
|
|
1200
1201
|
manualChunks: createSplitChunks(pluginContext.moduleDirectiveLayerMap, entryFiles),
|
|
1201
|
-
chunkFileNames
|
|
1202
|
+
chunkFileNames () {
|
|
1203
|
+
const ext = format === 'cjs' && outputFileExtension === '.cjs' ? 'cjs' : 'js';
|
|
1204
|
+
return '[name]-[hash].' + ext;
|
|
1205
|
+
},
|
|
1202
1206
|
// By default in rollup, when creating multiple chunks, transitive imports of entry chunks
|
|
1203
1207
|
// will be added as empty imports to the entry chunks. Disable to avoid imports hoist outside of boundaries
|
|
1204
1208
|
hoistTransitiveImports: false,
|