JSFiddle - React, Tailwind, and code Playground

HTML

<div class="container">
  <div class="item1">
    someverylongword
  </div>
</div>

CSS

.container {
  display: grid;
  grid-template-columns: 1fr;
  /*using 'px' instead of 'fr' works */
  grid-template-areas: "item1";
  width: 80px;
  border: 1px solid black;
}

.item1 {
  grid-area: "item1";
  overflow-wrap: break-word;
  /* overflow: hidden; */
  /* works when uncommented */
}