Expose an official API to access the current filename.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user