zthxxx / react-dev-inspector

jump to local IDE code directly from browser React component by just a simple click
https://react-dev-inspector.zthxxx.me
MIT License
1.13k stars 67 forks source link

@babel/types should be listed in dependencies instead of devDependencies #127

Closed heiseshandian closed 2 years ago

heiseshandian commented 2 years ago

Currently, in src/plugins/babel/visitor.ts, we directly use the utils imported from @babel/types/lib/builders/generated, which means @babel/types/lib/builders/generated is not only needed during development, we should put it under dependencies instead of devDependencies.

import {
  jsxAttribute,
  jsxIdentifier,
  stringLiteral,
} from '@babel/types/lib/builders/generated'
//...

const lineAttr: JSXAttribute | null = isNil(line)
    ? null
    : jsxAttribute(
      jsxIdentifier('data-inspector-line'),
      stringLiteral(line.toString()),
    )
zthxxx commented 2 years ago

@heiseshandian Sorry for wait, I have not noticed this issue's notification, now it fixed in react-dev-inspector@1.8.1