1. 21 Jun, 2022 11 commits
  2. 20 Jun, 2022 12 commits
  3. 19 Jun, 2022 7 commits
  4. 18 Jun, 2022 3 commits
    • Simon Richard's avatar
      Update custom-document.md (#37811) · 06eb73b2
      Simon Richard authored
      A small change, but eslint wasn't happy until I added this.
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      
      ## Feature
      
      - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [x] Documentation added
      - [ ] Telemetry added. In case of a feature if it's used or not.
      - [ ] Errors have helpful link attached, see `contributing.md`
      
      ## Documentation / Examples
      
      - [ ] Make sure the linting passes by running `pnpm lint`
      - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
      Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
      06eb73b2
    • Max Proske's avatar
      Convert amp example to TypeScript (#37744) · 1ccf8945
      Max Proske authored
      Converted AMP example over to TypeScript to match the Contribution guidelines, updated all dependencies, and made some necessary changes to allow AMP apps to build in TypeScript.
      
      I added an additional .d.ts file, and referenced it in the tsconfig.json include array, as per the [Next.js docs](https://nextjs.org/docs/basic-features/typescript#existing-projects). These additional types are required to allow lowercase AMP elements to be a property on JSX.IntrinsicElements.
      
      Fixes: 
      > Property 'amp-img' does not exist on type 'JSX.IntrinsicElements'.ts
      
      I also replaced all occurrences of styled JSX with [@ijjk's workaround](https://github.com/vercel/next.js/issues/7584#issuecomment-503376412) to get styles in the head at build time for AMP-only pages, hybrid AMP pages, and normal pages (non-AMP). 
      
      I tried using the useAmp hook first with multiple `<style jsx>` like this [Next.js discussion](https://github.com/vercel/next.js/discussions/16755), however AMP expects a [single `<style amp-custom>` tag in the head](https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#stylesheets).
      
      Fixes: 
      > The parent tag of tag 'style amp-custom' is 'body', but it can only be 'head'
      
      ## 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)
      Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
      1ccf8945
    • Sukka's avatar
      fix(config): only warn experimental feature when used (#37755) · 5c88484f
      Sukka authored
      <!--
      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:
      -->
      
      ```js
      // next.config.js
      module.exports = {
        experimental: {
          legacyBrowsers: false,
          sharedPool: true,
          newNextLinkBehavior: false
        }
      }
      ```
      
      With the current implementation, using the config above will warn the usage of experimental features. However, those are the preset values that are defined in `defaultConfig` which means actually no experimental feature has been enabled at all.
      
      The PR changes to only check if experimental features are actually enabled (have different values than the ones defined in `defaultConfig`).
      5c88484f
  5. 17 Jun, 2022 7 commits