Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !33131

being ssr friendly when accessing dom objects

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge jo-ssr-friendly into main Feb 17, 2021
  • Overview 18
  • Commits 2
  • Pipelines 0
  • Changes 23

Created by: Johann-S

Hi :)

A small PR to allow Bootstrap to be SSR friendly.

I had this idea in mind for quite a long time and it'll avoid developers some headache on how to handle errors like document is undefined or windows is undefined if they use SSR frameworks (for example Gatsby or Next.js)

I added an ESLint plugin to enforce that in all of our source code: https://www.npmjs.com/package/eslint-plugin-ssr-friendly

If you think it's not a relevant do not hesitate to close my PR 👍

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: jo-ssr-friendly