Open andreyvital opened 5 years ago
Hi @andreyvital ! Interesting use case! Currently im off for the weekend. Ill have a look at it ASAP!
Hey @andreyvital , I was unable to reproduce the issue.I succesfully managed to extract the svg snippet into its own component. Perhaps I misunderstood the issue? Here is the test case:
Also seeing the above error message in VSCode when using 'Extract Component' and typing in a filename [e.g. nestedComponent.jsx].
Occurs in minimal example:
import React, { Component } from 'react'
class MyComponent extends Component {
render() {
return (
<div>
Hello
<div>Nested</div>
</div>
)
}
}
I am also seeing this error when trying to extract a component in TSX
[BABEL] unknown: Configuration contains string/RegExp pattern, but no filename was passed to Babel
Thanks guys! Will have a look!
@borislit Any updates? Does this project depend on Babel being installed or could it be conflicting with my local version of babel?
Hi @southpolesteve. Had hard time finding time recently, but Im on it :) In terms of babel - since the extension is not installed into your project's node_module - there should be no conflicts. Which component have you tried to extract? Can you provide a code snippet that reproduced the issue?
I would love to use glean but this problem is blocking me as well. Tried uninstalling and reinstalling glean to no avail
hi all , I think the problem was caused by extension name of babel configuration , there seems like glean only expected an json format babel configuration . if your configuration format is .js , please try to change to .json ( ex. babel.config.json ) this is work for me . cc @TSMMark @borislit @southpolesteve @andreyvital
I'm getting this error when trying to extract to a file (and even just a component within the file):
That's the code block I'm trying to extract 👆