Skip to content

Commit

Permalink
fix: support common js exports
Browse files Browse the repository at this point in the history
  • Loading branch information
akameco committed Sep 4, 2019
1 parent 8c85fe3 commit 8e9da31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type Opts = {
export const extractReactIntl = _extractReactIntl

// eslint-disable-next-line max-lines-per-function
export default async (
const extractMessage = async (
locales: string[],
pattern: string,
buildDir: string,
Expand Down Expand Up @@ -131,3 +131,9 @@ export default async (
})
)
}

export default extractMessage

// For CommonJS default export support
module.exports = extractMessage
module.exports.default = extractMessage

0 comments on commit 8e9da31

Please sign in to comment.