Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit 6f4a533

Browse files
houfiookuryu
authored andcommitted
Fix Babel 7 compatibility (#129)
`basename` got removed: https://babeljs.io/blog/2017/03/01/upgrade-to-babel-7-for-tool-authors
1 parent b7f34c6 commit 6f4a533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ export default function ({types: t}) {
185185

186186
post(file) {
187187
const {opts} = this;
188-
const {basename, filename} = file.opts;
188+
const {filename} = file.opts;
189189

190+
const basename = p.basename(filename, p.extname(filename));
190191
const messages = file.get(MESSAGES);
191192
const descriptors = [...messages.values()];
192193
file.metadata['react-intl'] = {messages: descriptors};

0 commit comments

Comments
 (0)