Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Commit

Permalink
Update deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Sep 14, 2019
1 parent 8f9672d commit 9ecca7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 138 deletions.
59 changes: 4 additions & 55 deletions packages/next-bundle-analyzer/readme.md
Original file line number Diff line number Diff line change
@@ -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).
87 changes: 4 additions & 83 deletions packages/next-mdx/readme.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 9ecca7b

Please sign in to comment.