Skip to content

Commit

Permalink
fix(libConfig): import default in CJS build
Browse files Browse the repository at this point in the history
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
ShGKme committed Oct 6, 2023
1 parent 28a71a8 commit b108a87
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/libConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const createLibConfig = (entries: { [entryAlias: string]: string }, optio
const extension = format === 'es' ? 'mjs' : (format === 'cjs' ? 'cjs' : `${format}.js`)
return {
format,
interop: 'auto', // Add __esModule for CJS externals imports to fix interop issues in tools like Babel/TS
hoistTransitiveImports: false, // For libraries this might otherwise introduce side effects
preserveModules: false,
assetFileNames,
Expand Down

0 comments on commit b108a87

Please sign in to comment.