Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: throw Unexpected Name when pass string literal #97

Open
osddeitf opened this issue Aug 7, 2021 · 0 comments
Open

Bug: throw Unexpected Name when pass string literal #97

osddeitf opened this issue Aug 7, 2021 · 0 comments

Comments

@osddeitf
Copy link

osddeitf commented Aug 7, 2021

  • babel-plugin-preval version: 5.0.0 (preval.macro 3.0.0)
  • node version: v14.16.1
  • npm (or yarn) version: 6.14.12

Relevant code or config

export const searchPosts = preval`
  const tool = require('../../graphql/utils');
  module.exports = tool.maxDepth("searchPosts", 2);
`

What happened:
The "searchPosts" supposed to be a string literal, but this is what happened

preval.macro: Syntax Error: Unexpected Name "searchPosts". Learn more: https://www.npmjs.com/package/preval.macro

Reproduction repository:
I'll provide it when needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant