Unverified Commit 92aafcbc authored by Henrik Wenz's avatar Henrik Wenz Committed by GitHub

[Docs] Add config types to all examples (#40083)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Summary

- Added jsdoc typing for all examples using `next.config.js`
- Added jsdoc typing for all examples using `tailwind.config.js`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
parent e7e567b1
/** @type {import('next').NextConfig} */
module.exports = {
async rewrites() {
return [
......
/** @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
}
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.tsx', './pages/**/*.tsx'],
theme: {
......
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.js', './components/**/*.js'],
......
/** @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
}
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['cdn.builder.io'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.js', './pages/**/*.js'],
theme: {
......
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
async rewrites() {
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
loader: 'custom',
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['imgix.cosmicjs.com'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['www.datocms-assets.com'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: [process.env.NEXT_IMAGE_DOMAIN],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['static.ghost.org'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['media.graphcms.com'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['b-cdn.net'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['images.prismic.io'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
images: {
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['localhost'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./components/**/*.js', './pages/**/*.js'],
theme: {
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['media.umbraco.io'],
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
......@@ -5,6 +5,7 @@ if (!process.env.WORDPRESS_API_URL) {
`)
}
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: [
......
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
basePath: '/gh-pages-test',
}
/** @type {import('next').NextConfig} */
module.exports = {
async headers() {
return [
......
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales: ['en', 'fr', 'nl'],
......
/** @type {import('next').NextConfig} */
module.exports = {
images: {
domains: ['assets.vercel.com'],
......
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
modularizeImports: {
......
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
reactRemoveProperties: true,
......
/** @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)
......
/** @type {import('next').NextConfig} */
module.exports = {
experimental: {
removeConsole: {
......
/** @type {import("next").NextConfig} */
const config = {
module.exports = {
reactStrictMode: true,
}
module.exports = config
/** @type {import('next').NextConfig} */
module.exports = {
async rewrites() {
return [
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.module.rules.push({
......
/** @type {import('next').NextConfig} */
module.exports = {
output: 'standalone',
}
/** @type {import('next').NextConfig} */
module.exports = {
output: 'standalone',
}
/** @type {import('next').NextConfig} */
module.exports = {
distDir: '../.next',
}
/** @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
......
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales: ['en', 'de'],
......
const path = require('path')
const CopyPlugin = require('copy-webpack-plugin')
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.plugins.push(
......
const { locales, sourceLocale } = require('./lingui.config.js')
/** @type {import('next').NextConfig} */
module.exports = {
i18n: {
locales,
......
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (configuration) => {
configuration.module.rules.push({
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config) => {
config.resolve.alias = {
......
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config, { isServer }) => {
if (isServer) {
......
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
}
/** @type {import('next').NextConfig} */
module.exports = {
webpack: function (config) {
config.externals = config.externals || {}
......
const colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: 'class',
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config, options) {
config.module.rules.push({
......
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: 'jit',
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
......
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config) {
config.output.webassemblyModuleFilename = 'static/wasm/[modulehash].wasm'
......
const path = require('path')
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config, { dev, isServer }) {
if (dev && !isServer) {
......
/** @type {import('next').NextConfig} */
module.exports = {
basePath: '/blog',
}
const { BLOG_URL } = process.env
/** @type {import('next').NextConfig} */
module.exports = {
async rewrites() {
return [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment