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

Commit 33689e3

Browse files
committed
Merge branch 'toadzky-master'
2 parents 0a56e3c + 5f2fe57 commit 33689e3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,16 @@ export default function () {
154154
file.metadata['react-intl'] = {messages: descriptors};
155155

156156
if (opts.messagesDir && descriptors.length > 0) {
157+
// Make sure the relative path is "absolute" before
158+
// joining it with the `messagesDir`.
159+
let relativePath = p.join(
160+
path.sep,
161+
p.relative(process.cwd(), filename)
162+
);
163+
157164
let messagesFilename = p.join(
158165
opts.messagesDir,
159-
p.dirname(p.relative(process.cwd(), filename)),
166+
p.dirname(relativePath),
160167
basename + '.json'
161168
);
162169

0 commit comments

Comments
 (0)