diff --git a/examples/with-emotion-swc/README.md b/examples/with-emotion-swc/README.md index a253be53d1..0ee0e7dfec 100644 --- a/examples/with-emotion-swc/README.md +++ b/examples/with-emotion-swc/README.md @@ -1,37 +1,3 @@ # Emotion Example -Extract and inline critical css with -[@emotion/css](https://github.com/emotion-js/emotion/tree/master/packages/css), -[@emotion/server](https://github.com/emotion-js/emotion/tree/master/packages/server), -[@emotion/react](https://github.com/emotion-js/emotion/tree/master/packages/react), -and [@emotion/styled](https://github.com/emotion-js/emotion/tree/master/packages/styled). - -## Preview - -Preview the example live on [StackBlitz](http://stackblitz.com/): - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-emotion) - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-emotion&project-name=with-emotion&repository-name=with-emotion) - -## How to use - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: - -```bash -npx create-next-app --example with-emotion-swc with-emotion-swc-app -``` - -```bash -yarn create next-app --example with-emotion-swc with-emotion-swc-app -``` - -```bash -pnpm create next-app --example with-emotion-swc with-emotion-swc-app -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +See the [`with-emotion` example](https://github.com/vercel/next.js/tree/canary/examples/with-emotion). diff --git a/examples/with-emotion-swc/next-env.d.ts b/examples/with-emotion-swc/next-env.d.ts deleted file mode 100644 index 4f11a03dc6..0000000000 --- a/examples/with-emotion-swc/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/examples/with-emotion-swc/package.json b/examples/with-emotion-swc/package.json deleted file mode 100644 index 4800e033cf..0000000000 --- a/examples/with-emotion-swc/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "private": true, - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "@emotion/react": "11.10.4", - "@emotion/styled": "11.10.4", - "next": "latest", - "react": "18.2.0", - "react-dom": "18.2.0" - }, - "devDependencies": { - "@types/node": "18.0.6", - "@types/react": "18.2.8", - "@types/react-dom": "18.0.6", - "typescript": "^4.7.4" - } -} diff --git a/examples/with-emotion-vanilla/.babelrc b/examples/with-emotion-vanilla/.babelrc deleted file mode 100644 index d69237b388..0000000000 --- a/examples/with-emotion-vanilla/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": [["next/babel"]], - "plugins": ["@emotion/babel-plugin"] -} diff --git a/examples/with-emotion-vanilla/README.md b/examples/with-emotion-vanilla/README.md index 11a1d98f8b..0ee0e7dfec 100644 --- a/examples/with-emotion-vanilla/README.md +++ b/examples/with-emotion-vanilla/README.md @@ -1,30 +1,3 @@ -# Emotion Vanilla Example +# Emotion Example -Extract and inline critical css with -[emotion](https://github.com/emotion-js/emotion/tree/master/packages/emotion), -[@emotion/server](https://github.com/emotion-js/emotion/tree/master/packages/server), -[@emotion/css](https://github.com/emotion-js/emotion/tree/master/packages/css) - -## Deploy your own - -Deploy the example using [Vercel](https://vercel.com) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-emotion-vanilla) - -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/vercel/next.js/tree/canary/examples/with-emotion-vanilla) - -## How to use - -Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: - -```bash -npx create-next-app --example with-emotion-vanilla with-emotion-vanilla-app -``` - -```bash -yarn create next-app --example with-emotion-vanilla with-emotion-vanilla-app -``` - -```bash -pnpm create next-app --example with-emotion-vanilla with-emotion-vanilla-app -``` - -Deploy it to the cloud with [Vercel](https://vercel.com/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +See the [`with-emotion` example](https://github.com/vercel/next.js/tree/canary/examples/with-emotion). diff --git a/examples/with-emotion-vanilla/package.json b/examples/with-emotion-vanilla/package.json deleted file mode 100644 index ae8ec004d0..0000000000 --- a/examples/with-emotion-vanilla/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "private": true, - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start" - }, - "devDependencies": { - "@emotion/babel-plugin": "11.10.2" - }, - "dependencies": { - "@emotion/css": "11.11.2", - "@emotion/server": "11.10.0", - "next": "latest", - "react": "^18.2.0", - "react-dom": "^18.2.0" - } -} diff --git a/examples/with-emotion-vanilla/pages/_document.js b/examples/with-emotion-vanilla/pages/_document.js deleted file mode 100644 index 51ee8584cd..0000000000 --- a/examples/with-emotion-vanilla/pages/_document.js +++ /dev/null @@ -1,33 +0,0 @@ -import Document, { Html, Head, Main, NextScript } from "next/document"; -import * as React from "react"; -import { renderStatic } from "../shared/renderer"; -export default class AppDocument extends Document { - static async getInitialProps(ctx) { - const initialProps = await Document.getInitialProps(ctx); - const { css, ids } = await renderStatic(initialProps.html); - return { - ...initialProps, - styles: ( - - {initialProps.styles} -