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

Fix Babel 7 compatibility #129

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ export default function ({types: t}) {

post(file) {
const {opts} = this;
const {basename, filename} = file.opts;
const {filename} = file.opts;

const basename = p.basename(filename, p.extname(filename));
const messages = file.get(MESSAGES);
const descriptors = [...messages.values()];
file.metadata['react-intl'] = {messages: descriptors};
Expand Down