From 9ecca7b492518464897ea866b4abcdc6214bf705 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 14 Sep 2019 21:09:31 +0200 Subject: [PATCH] Update deprecation message --- packages/next-bundle-analyzer/readme.md | 59 ++--------------- packages/next-mdx/readme.md | 87 ++----------------------- 2 files changed, 8 insertions(+), 138 deletions(-) diff --git a/packages/next-bundle-analyzer/readme.md b/packages/next-bundle-analyzer/readme.md index 7bf1b0df..75137217 100644 --- a/packages/next-bundle-analyzer/readme.md +++ b/packages/next-bundle-analyzer/readme.md @@ -1,58 +1,7 @@ -# Next.js + Webpack Bundle Analyzer +# The Next.js + Webpack Bundle Analyzer plugin has been moved -Use `webpack-bundle-analyzer` in your Next.js project +**This plugin has been moved to [@next/bundle-analyzer](https://github.com/zeit/next.js/tree/canary/packages/next-bundle-analyzer)** -📢 **This repo is now deprecated and has been moved to [@next/bundle-analyzer](https://github.com/zeit/next.js/tree/canary/packages/next-bundle-analyzer)** +--- -## Installation - -``` -npm install --save @zeit/next-bundle-analyzer -``` - -or - -``` -yarn add @zeit/next-bundle-analyzer -``` - -### Usage with environment variables - -Create a next.config.js (and make sure you have next-bundle-analyzer set up) - -```js -const withBundleAnalyzer = require("@zeit/next-bundle-analyzer"); - -module.exports = withBundleAnalyzer({ - analyzeServer: ["server", "both"].includes(process.env.BUNDLE_ANALYZE), - analyzeBrowser: ["browser", "both"].includes(process.env.BUNDLE_ANALYZE), - bundleAnalyzerConfig: { - server: { - analyzerMode: 'static', - reportFilename: '../bundles/server.html' - }, - browser: { - analyzerMode: 'static', - reportFilename: '../bundles/client.html' - } - } -}); -``` - -Then you can run one of these commands: - -```bash -# Build and analyze the back end server bundle -BUNDLE_ANALYZE=server yarn build - -# Build and analyze the front end browser bundle -BUNDLE_ANALYZE=browser yarn build - -# Build and analyze both server and browser -BUNDLE_ANALYZE=both yarn build - -# Build and analyze neither server nor browser -yarn build -``` - -If you choose both then two different browser windows will open. One will be for the server bundle, one for the browser bundle. +The previous readme (not recommended) is available [here](https://github.com/zeit/next-plugins/tree/139d283/packages/next-bundle-analyzer). diff --git a/packages/next-mdx/readme.md b/packages/next-mdx/readme.md index 1a338d94..d47971e7 100644 --- a/packages/next-mdx/readme.md +++ b/packages/next-mdx/readme.md @@ -1,86 +1,7 @@ -# Next.js + MDX +# The Next.js + MDX plugin has been moved -Use [MDX](https://github.com/mdx-js/mdx) with [Next.js](https://github.com/zeit/next.js) +**This plugin has been moved to [@next/mdx](https://github.com/zeit/next.js/tree/canary/packages/next-mdx)** -📢 **This repo is now deprecated and has been moved to [@next/mdx](https://github.com/zeit/next.js/tree/canary/packages/next-mdx)** +--- -## Installation - -``` -npm install --save @zeit/next-mdx @mdx-js/loader -``` - -or - -``` -yarn add @zeit/next-mdx @mdx-js/loader -``` - -## Usage - -Create a `next.config.js` in your project - -```js -// next.config.js -const withMDX = require('@zeit/next-mdx')() -module.exports = withMDX({ - /* config options here */ -}) -``` - -Optionally you can provide [MDX options](https://github.com/mdx-js/mdx#options): - -```js -// next.config.js -const withMDX = require('@zeit/next-mdx')({ - options: { - mdPlugins: [ - - ], - hastPlugins: [ - - ] - } -}) -module.exports = withMDX({ - /* config options here */ -}) -``` - -Optionally you can add your custom Next.js configuration as parameter - -```js -// next.config.js -const withMDX = require('@zeit/next-mdx')() -module.exports = withMDX({ - webpack(config, options) { - return config - } -}) -``` - -Optionally you can match other file extensions for MDX compilation, by default only `.mdx` is supported - -```js -// next.config.js -const withMDX = require('@zeit/next-mdx')({ - extension: /\.(md|mdx)$/ -}) -module.exports = withMDX({ - /* config options here */ -}) -``` - -## Top level .mdx pages - -Define the `pagesExtensions` option to have Next.js handle `.mdx` files in the `pages` directory as pages: - -```js -// next.config.js -const withMDX = require('@zeit/next-mdx')({ - extension: /\.mdx?$/ -}) -module.exports = withMDX({ - pageExtensions: ['js', 'jsx', 'mdx'] -}) -``` +The previous readme (not recommended) is available [here](https://github.com/zeit/next-plugins/tree/139d283/packages/next-mdx).