jhamlet / svg-react-loader

Webpack SVG to React Component Loader
MIT License
559 stars 82 forks source link

SyntaxError v0.4.0-beta.2 #39

Closed Inoir closed 8 years ago

Inoir commented 8 years ago

Hey ive tried the new version, so i can test the "unknown prop" solution.

Now ive got another issue on my svg named Carline(TT). Reason for that error: the lib is creating an function to return a new React element. The second part of the name ("(TT)") will be in these created function name. So it looks like this at the end:

function Carline(TT) (props) { ... }

This is throwing an syntax error. Is it possible to check the name before creating the function? I can easy resolve these error for the moment.

tera-sinube commented 8 years ago

@Inoir Take a look at the name query parameter, and the examples webpack config for how to use webpack generated names.