kentcdodds/babel-plugin-codegen

Property value expected type of string but got null

Open

#17 创建于 2018年10月26日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)TypeScript (27 fork)github user discovery
bughelp wanted

仓库指标

Star
 (347 star)
PR 合并指标
 (PR 指标待抓取)

描述

  • babel-plugin-codegen version: ^3.0.0
  • node version: 10.12.0
  • npm (or yarn) version: 6.4.1

Relevant code or config

// @codegen

const hello = 'hello';

module.exports = `
  export default {};
`;

I was expecting the simple code above to work but it just gives the error mentioned in the title.

screenshot 2018-10-26 at 17 12 46

However, if we remove the line const hello = 'hello', everything works as expected and export default {}; it's correctly generated

贡献者指南