Skip to content

A minimal example integrating next.js, typescript, and react-cosmos

Notifications You must be signed in to change notification settings

zalbia/with-typescript-react-cosmos

Repository files navigation

TypeScript/Next.js/React Cosmos example

This is a simple project forking the next.js with-typescript example that shows the usage of Next.js with TypeScript and React Cosmos.

How to use it?

Install it and run:

npm install
npm run dev
npm run cosmos
# or
yarn
yarn dev
yarn cosmos

The idea behind the example

Use the @zeit/next-typescript plugin to inject the Webpack config required to compile TypeScript to JavaScript. For information about using a TSConfig have a look at the plugin page.

To get react-cosmos working, we create a webpack config separate from next.js and point cosmos.config.js to it.

About

A minimal example integrating next.js, typescript, and react-cosmos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published