Skip to content

Commit

Permalink
fix: create proper named exports for commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Apr 22, 2020
1 parent 46f465c commit 20087b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const inspectCustom = (value, options, type) => {
}

// eslint-disable-next-line complexity
export default function inspect(value, options) {
export function inspect(value, options) {
options = normaliseOptions(options)
options.inspect = inspect
const { customInspect } = options
Expand Down Expand Up @@ -170,3 +170,5 @@ export function registerStringTag(stringTag, inspector) {
}

export const custom = chaiInspect

export default inspect
2 changes: 2 additions & 0 deletions rollup.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default [
file: 'loupe.js',
name: 'loupe',
format: 'umd',
exports: 'named',
},
plugins,
},
Expand All @@ -38,6 +39,7 @@ export default [
file: 'loupe.test.js',
name: 'loupe',
format: 'umd',
exports: 'named',
},
plugins: [...plugins, coverage({ exclude: 'test/*.js' })],
},
Expand Down

0 comments on commit 20087b8

Please sign in to comment.