Expose an official API to access the current filename.

This commit is contained in:
Logan Smyth
2017-11-06 17:22:18 -08:00
parent 82513465ee
commit 6684986372
8 changed files with 31 additions and 23 deletions

View File

@@ -50,7 +50,7 @@ export default function({ types: t }) {
}
if (!state.fileNameIdentifier) {
const fileName = state.file.opts.filename || "";
const fileName = state.filename || "";
const fileNameIdentifier = path.scope.generateUidIdentifier(
FILE_NAME_VAR,