Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Add config types to all examples #40083

Merged
merged 3 commits into from Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/active-class-name/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
ijjk marked this conversation as resolved.
Show resolved Hide resolved
module.exports = {
async rewrites() {
return [
Expand Down
2 changes: 1 addition & 1 deletion examples/analyze-bundles/next.config.js
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})

/** @type {import('next').NextConfig} */
const nextConfig = {
// any configs you need
}
Expand Down
1 change: 1 addition & 0 deletions examples/blog-starter/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.tsx', './pages/**/*.tsx'],
theme: {
Expand Down
1 change: 1 addition & 0 deletions examples/blog-with-comment/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.js', './components/**/*.js'],
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/next.config.js
@@ -1,10 +1,10 @@
/** @type {import('next').NextConfig} */
const withNextra = require('nextra')({
theme: 'nextra-theme-blog',
themeConfig: './theme.config.js',
// optional: add `unstable_staticImage: true` to enable Nextra's auto image import
})

/** @type {import('next').NextConfig} */
const nextConfig = {
// any configs you need
}
Expand Down
1 change: 1 addition & 0 deletions examples/cms-agilitycms/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-builder-io/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['cdn.builder.io'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-builder-io/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.js', './pages/**/*.js'],
theme: {
Expand Down
1 change: 1 addition & 0 deletions examples/cms-buttercms/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
async rewrites() {
Expand Down
1 change: 1 addition & 0 deletions examples/cms-contentful/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
loader: 'custom',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-contentful/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-cosmic/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['imgix.cosmicjs.com'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-cosmic/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-datocms/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['www.datocms-assets.com'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-datocms/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-drupal/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: [process.env.NEXT_IMAGE_DOMAIN],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-drupal/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-ghost/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['static.ghost.org'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-ghost/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-graphcms/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['media.graphcms.com'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-graphcms/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-kontent/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-prepr/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['b-cdn.net'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-prepr/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-prismic/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['images.prismic.io'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-prismic/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-sanity/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
images: {
Expand Down
1 change: 1 addition & 0 deletions examples/cms-sanity/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-storyblok/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-strapi/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['localhost'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-strapi/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-takeshape/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-tina/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.js', './pages/**/*.js'],
theme: {
Expand Down
1 change: 1 addition & 0 deletions examples/cms-umbraco-heartcore/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['media.umbraco.io'],
Expand Down
1 change: 1 addition & 0 deletions examples/cms-umbraco-heartcore/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/cms-wordpress/next.config.js
Expand Up @@ -5,6 +5,7 @@ if (!process.env.WORDPRESS_API_URL) {
`)
}

/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: [
Expand Down
1 change: 1 addition & 0 deletions examples/cms-wordpress/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/github-pages/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
basePath: '/gh-pages-test',
}
1 change: 1 addition & 0 deletions examples/headers/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
async headers() {
return [
Expand Down
1 change: 1 addition & 0 deletions examples/i18n-routing/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales: ['en', 'fr', 'nl'],
Expand Down
1 change: 1 addition & 0 deletions examples/image-component/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['assets.vercel.com'],
Expand Down
1 change: 1 addition & 0 deletions examples/modularize-imports/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
modularizeImports: {
Expand Down
1 change: 1 addition & 0 deletions examples/react-remove-properties/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
reactRemoveProperties: true,
Expand Down
1 change: 1 addition & 0 deletions examples/redirects/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
// Uncomment the line below to enable basePath, pages and
// redirects will then have a path prefix (`/app` in this case)
Expand Down
1 change: 1 addition & 0 deletions examples/remove-console/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
removeConsole: {
Expand Down
4 changes: 1 addition & 3 deletions examples/reproduction-template/next.config.js
@@ -1,6 +1,4 @@
/** @type {import("next").NextConfig} */
const config = {
module.exports = {
reactStrictMode: true,
}

module.exports = config
1 change: 1 addition & 0 deletions examples/rewrites/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
async rewrites() {
return [
Expand Down
1 change: 1 addition & 0 deletions examples/with-compiled-css/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.module.rules.push({
Expand Down
1 change: 1 addition & 0 deletions examples/with-docker-multi-env/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
output: 'standalone',
}
1 change: 1 addition & 0 deletions examples/with-docker/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
output: 'standalone',
}
1 change: 1 addition & 0 deletions examples/with-firebase-hosting/src/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
distDir: '../.next',
}
1 change: 1 addition & 0 deletions examples/with-http2/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
/* this needs to be set to false until a bug in the compression npm module gets fixed.
reference: https://github.com/expressjs/compression/issues/122
Expand Down
1 change: 1 addition & 0 deletions examples/with-i18n-next-intl/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales: ['en', 'de'],
Expand Down
2 changes: 2 additions & 0 deletions examples/with-ionic-typescript/next.config.js
@@ -1,5 +1,7 @@
const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')

/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.plugins.push(
Expand Down
1 change: 1 addition & 0 deletions examples/with-lingui/next.config.js
@@ -1,5 +1,6 @@
const { locales, sourceLocale } = require('./lingui.config.js')

/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales,
Expand Down
1 change: 1 addition & 0 deletions examples/with-mysql/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
}
1 change: 1 addition & 0 deletions examples/with-mysql/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
Expand Down
1 change: 1 addition & 0 deletions examples/with-netlify-cms/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (configuration) => {
configuration.module.rules.push({
Expand Down
1 change: 1 addition & 0 deletions examples/with-react-native-web/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.resolve.alias = {
Expand Down
1 change: 1 addition & 0 deletions examples/with-redis/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
Expand Down
1 change: 1 addition & 0 deletions examples/with-sitemap/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config, { isServer }) => {
if (isServer) {
Expand Down
1 change: 1 addition & 0 deletions examples/with-storybook/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
}
1 change: 1 addition & 0 deletions examples/with-styletron/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack: function (config) {
config.externals = config.externals || {}
Expand Down
1 change: 1 addition & 0 deletions examples/with-tailwindcss-emotion/tailwind.config.js
@@ -1,5 +1,6 @@
const colors = require('tailwindcss/colors')

/** @type {import('tailwindcss').Config} */
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
Expand Down
1 change: 1 addition & 0 deletions examples/with-typescript-graphql/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config, options) {
config.module.rules.push({
Expand Down
1 change: 1 addition & 0 deletions examples/with-userbase/tailwind.config.js
@@ -1,3 +1,4 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
Expand Down
1 change: 1 addition & 0 deletions examples/with-webassembly/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config) {
config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'
Expand Down
1 change: 1 addition & 0 deletions examples/with-why-did-you-render/next.config.js
@@ -1,5 +1,6 @@
const path = require('path')

/** @type {import('next').NextConfig} */
module.exports = {
webpack(config, { dev, isServer }) {
if (dev && !isServer) {
Expand Down
1 change: 1 addition & 0 deletions examples/with-zones/blog/next.config.js
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
module.exports = {
basePath: '/blog',
}
1 change: 1 addition & 0 deletions examples/with-zones/home/next.config.js
@@ -1,5 +1,6 @@
const { BLOG_URL } = process.env

/** @type {import('next').NextConfig} */
module.exports = {
async rewrites() {
return [
Expand Down