svg-inline-loader icon indicating copy to clipboard operation
svg-inline-loader copied to clipboard

Usage with react + server-side rendering

Open axelson opened this issue 7 years ago • 4 comments

Does this library support server-side rendering with React? I can't find any usage examples.

axelson avatar Mar 22 '17 19:03 axelson

I would love to see this example as well

dwilt avatar Mar 31 '17 14:03 dwilt

I hate to be That Guy, but after struggling for a while to adapt this and svgo-webpack-loader to React I finally landed on react-svg-loader, which seems a better fit for this use-case.

phyllisstein avatar Apr 29 '17 05:04 phyllisstein

Hi was having a similar issue when using SSR for svgs - "cant resolve module". After trying many different manual processes I came across this:

sunesimonsen-babel-plugin-inline-react-svg

Add it to your babel config along with svg-inline-loader in you webpack config and it resolved the issue for me...

Hopefully save someone else hours

GearoidCollins avatar Apr 10 '18 09:04 GearoidCollins

@GearoidCollins Could you please post your webpack and babel configs? I'm trying this solution but it's still not working for me

karlwills avatar Jul 22 '19 14:07 karlwills