From 166b644fdd22a005fe999bcabf442b95847a907c Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 14 Sep 2019 21:10:07 +0200 Subject: [PATCH] Remove old code --- packages/next-bundle-analyzer/index.js | 39 ---------------------- packages/next-bundle-analyzer/package.json | 11 ------ packages/next-mdx/index.js | 30 ----------------- packages/next-mdx/package.json | 11 ------ 4 files changed, 91 deletions(-) delete mode 100644 packages/next-bundle-analyzer/index.js delete mode 100644 packages/next-bundle-analyzer/package.json delete mode 100644 packages/next-mdx/index.js delete mode 100644 packages/next-mdx/package.json diff --git a/packages/next-bundle-analyzer/index.js b/packages/next-bundle-analyzer/index.js deleted file mode 100644 index ba6c34e7..00000000 --- a/packages/next-bundle-analyzer/index.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = (nextConfig = {}) => { - return Object.assign({}, nextConfig, { - webpack(config, options) { - if (!options.defaultLoaders) { - throw new Error( - 'This plugin is not compatible with Next.js versions below 5.0.0 https://err.sh/next-plugins/upgrade' - ) - } - - const { analyzeServer, analyzeBrowser } = nextConfig - const { - bundleAnalyzerConfig: { browser = {}, server = {} } = {} - } = nextConfig - const { isServer } = options - - if ((isServer && analyzeServer) || (!isServer && analyzeBrowser)) { - const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') - config.plugins.push( - new BundleAnalyzerPlugin( - Object.assign( - {}, - { - analyzerMode: 'server', - analyzerPort: isServer ? 8888 : 8889, - openAnalyzer: true - }, - isServer ? server : browser - ) - ) - ) - } - - if (typeof nextConfig.webpack === 'function') { - return nextConfig.webpack(config, options) - } - return config - } - }) -} diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json deleted file mode 100644 index 669c3a6f..00000000 --- a/packages/next-bundle-analyzer/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@zeit/next-bundle-analyzer", - "version": "0.1.3-canary.1", - "main": "index.js", - "license": "MIT", - "repository": "zeit/next-plugins", - "dependencies": { - "webpack-bundle-analyzer": "3.0.2" - }, - "gitHead": "1d48c25311c037ec2718b3fc9511e2e2a882eed1" -} diff --git a/packages/next-mdx/index.js b/packages/next-mdx/index.js deleted file mode 100644 index 1b52c062..00000000 --- a/packages/next-mdx/index.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = (pluginOptions = {}) => (nextConfig = {}) => { - const extension = pluginOptions.extension || /\.mdx$/ - - return Object.assign({}, nextConfig, { - webpack(config, options) { - if (!options.defaultLoaders) { - throw new Error( - 'This plugin is not compatible with Next.js versions below 5.0.0 https://err.sh/next-plugins/upgrade' - ) - } - - config.module.rules.push({ - test: extension, - use: [ - options.defaultLoaders.babel, - { - loader: '@mdx-js/loader', - options: pluginOptions.options - } - ] - }) - - if (typeof nextConfig.webpack === 'function') { - return nextConfig.webpack(config, options) - } - - return config - } - }) -} diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json deleted file mode 100644 index 70f84081..00000000 --- a/packages/next-mdx/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@zeit/next-mdx", - "version": "1.1.1-canary.4", - "main": "index.js", - "license": "MIT", - "repository": "zeit/next-plugins", - "peerDependencies": { - "@mdx-js/loader": ">=0.15.0" - }, - "gitHead": "f6b452d22a289060c1e8bde91c64ca3e99108695" -}