Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server side rendering not working #78

Open
artursgirons opened this issue Sep 21, 2016 · 12 comments
Open

Server side rendering not working #78

artursgirons opened this issue Sep 21, 2016 · 12 comments
Labels

Comments

@artursgirons
Copy link

It feels like when webpack-dev-middleware brakes it all:
Unexpected token (1:1)

1 |

@boopathi
Copy link
Owner

boopathi commented Oct 8, 2016

Looks like the SVG is not passed via svg-loader.

@brunoguerra
Copy link

Hi @artursgirons I've been searching for server side rendering without loose my mind because just a icon, so I found this

https://medium.com/@david.gilbertson/icons-as-react-components-de3e33cb8792#.3b0493ysm

So, just like it on heart icon and love all this too

@boopathi server side renders was be a great example, but https://github.com/webpack/react-webpack-server-side-example it not goes ahead

@jwwlai
Copy link

jwwlai commented Mar 29, 2017

Hi @artursgirons I think I am running to this same issue.

My node service crashes when I do a browser refresh on the page that imports the svg file but if I load my app on a different page that does not have svg file imported and then proceed to the page that imports the svg, it works totally fine until I refresh the page and spits out the same error you described.

Wondering if you had made any progress on the issue?

@mrchief
Copy link

mrchief commented Apr 5, 2017

It doesn't pass svgo plugins options correctly too:

> 1 | <svg width="73px" height="15px" viewBox="0 0 73 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
      |                                                                                                      ^
    2 |     <title>Powered By - Stacked</title>
    3 |     <desc>Created with Sketch.</desc>
    4 |     <defs>
        {
          test: /\.svg$/,
            loaders: [
            {
              loader: 'babel-loader',
              query: {
                presets: ['es2015']
              }
            },
            {
              loader: 'react-svg-loader',
              query: {
                jsx: true,
                svgo: {
                  plugins: [{removeTitle: false}, {removeXMLNS: true}],
                  floatPrecision: 2
                }
              }
            }
          ]
        }

@stale
Copy link

stale bot commented Feb 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 13, 2019
@mrchief
Copy link

mrchief commented Feb 13, 2019

Stale bot strikes again!

@stale stale bot removed the wontfix label Feb 13, 2019
@stale
Copy link

stale bot commented Apr 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 14, 2019
@mrchief
Copy link

mrchief commented Apr 14, 2019

Looks like there is no interest in fixing this?

@stale stale bot removed the wontfix label Apr 14, 2019
@voletiswaroop
Copy link

@artursgirons I'm also running into the same issue.

It is working until I refresh the page, Once I refresh the page node is crashing with error: UnhandledPromiseRejectionWarning: Unhandled promise rejection

@karlwills
Copy link

Has anyone had any joy with this at all? I'm still having issues.

@kylemh
Copy link

kylemh commented Jul 23, 2019

react-svg-loader works when used with Next.js, so I'm not sure how it relates strictly to server-side rendering/hydration.

@stale
Copy link

stale bot commented Sep 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants