Switch branches/tags
Find file History
#2110 Compare This branch is 16 commits ahead, 120 commits behind v3-beta.
Latest commit 25dbcce Apr 30, 2017 @aranajhonny aranajhonny committed with timneutkens fix #1833, update all examples. (#1834)
Permalink
..
Failed to load latest commit information.
pages examples: add `svg-components` (#982) Mar 15, 2017
svgs
.babelrc examples: add `svg-components` (#982) Mar 15, 2017
README.md Add deploy now button to the top of all example READMEs (#1763) Apr 22, 2017
package.json fix #1833, update all examples. (#1834) Apr 30, 2017

README.md

Deploy to now

SVG components example

How to use

Download the example or clone the repo:

curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/svg-components
cd svg-components

Install it and run:

npm install
npm run dev

Deploy it to the cloud with now (download)

now

The idea behind the example

This example uses a custom .babelrc to add support for importing .svg files and rendering them as React components. babel-plugin-inline-react-svg is used to handle transpiling the SVGs.