babel
babel copied to clipboard
template.ast() doesn't respect preserveComments option.
Bug Report
Current Behavior
const testAst = api.template.ast(`test(/* test */ 'test')`, {
preserveComments: true
});
Will have no comment node in the resulting AST.
Expected behavior/code The resulting AST should have comment node
Environment
- Babel version(s): 7.3.4
- Node/npm version: 10.15.2
- OS: Windows 10
- Monorepo: no
- How you are using Babel: API.
Hey @xbtsw! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.