-
Notifications
You must be signed in to change notification settings - Fork 0
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
Migrating to nextjs #7
Comments
TODO
Nice to have
|
Interesting details:
|
One of my biggest concerns was the number of URLs that google has discovered but not indexed from our sitemap: Out of the Even with all that, we are getting some traffic from Google which is also our #1 traffic source. Other advantages
Pain Points
|
ReduxUsing Redux is tricky, I would have loved to remove it by this point but we have a bunch of code that depends on it. Mainly for our search page and storing the current state of the user's datasets. From the examples, there seem to be two approaches to include it. Both create higher order components, in one there's a One disadvantage of the latter approach is that it disables automatic static optimization for nextjs. |
Additional SEO considerations
|
CSS Styles
Can global styles only be imported on Nextjs doesn't work with CSS files in Started to get this warnings: webpack-contrib/mini-css-extract-plugin#250 They recommend
Also, pages were not rendering correctly when navigating on the client-side: |
Packages to remove
|
Sitemap sample
|
TestsHad some issues mocking Bigger problems with the integration tests. I need to find a way to https://spectrum.chat/next-js/general/end-to-end-integration-test~74921ed4-2632-410f-93c1-8e3e6407dc1b |
Optimizing buildChunking strategy changed with vercel/next.js#7631 By default with Nextjs vs with custom config with custom config cost of javscript suggest splitting large bundles https://v8.dev/blog/cost-of-javascript-2019 |
Page speed scores before |
Migrating create react app to nextjs
and so it begins
Add .next/ to
.gitignore
.Initially I thought I would have to change the directory structure, but next.js supports having the pages directory in
src/pages
vercel/next.js#8451Styles and Images
Started to get errors about importing
.sass
files which are used heavily on refine.bio. This is suported with a pluginIt was also needed for CSS imports https://github.com/zeit/next-plugins/tree/master/packages/next-css
For the
svg
files the recommended approach is to use babel-plugin-inline-react-svg and import the SVG as react components. However in refine.bio we have been importing them as images, which is maybe more convenient but less efficient.After some research, I found next-images which seems to address our specific case.
With that the first error appeared :)
Other projects/demos
The text was updated successfully, but these errors were encountered: