Remove the nonstandard basename option.
This commit is contained in:
@@ -42,7 +42,7 @@ export default function ({ types: t }) {
|
||||
visitor: {
|
||||
ExportDefaultDeclaration({ node }, state) {
|
||||
if (isCreateClass(node.declaration)) {
|
||||
let displayName = state.file.opts.basename;
|
||||
let displayName = path.basename(state.file.opts.filename, path.extname(state.file.opts.filename));
|
||||
|
||||
// ./{module name}/index.js
|
||||
if (displayName === "index") {
|
||||
|
||||
Reference in New Issue
Block a user