Skip to content

create-react-app logs warnings for source maps with react-components #21686

@ling1726

Description

@ling1726

simply install create-react-app and react-components and we get lots of this error

image

Code used in create-react-app, pulled from the card example in the docsite

import * as React from "react";

import { Body, Caption } from "@fluentui/react-text";

import { Button } from "@fluentui/react-button";
import { OpenRegular, MoreVerticalRegular } from "@fluentui/react-icons";
import {
  Card,
  CardFooter,
  CardHeader,
  CardPreview,
} from "@fluentui/react-components/unstable"; // codesandbox-dependency: @fluentui/react-card ^9.0.0-beta

const ASSET_URL =
  "https://raw.githubusercontent.com/microsoft/fluentui/master/packages/react-card";

const avatarMauricioURL = ASSET_URL + "/assets/avatar_mauricio.svg";
const powerpointLogoURL = ASSET_URL + "/assets/powerpoint_logo.svg";
const aiDeckTemplateURL = ASSET_URL + "/assets/ai_deck_template.png";

export const Default = () => {
  return (
    <>
      <Card tabIndex={0} onClick={() => console.log("Test action")}>
        <CardHeader
          image={<img src={avatarMauricioURL} alt="Face of a person" />}
          header={
            <Body>
              <b>Mauricio August</b> + 7 others edited
            </Body>
          }
          description={<Caption>Artificial Intelligence Deck</Caption>}
          action={
            <Button
              appearance="transparent"
              icon={<MoreVerticalRegular fontSize={20} />}
            />
          }
        />

        <CardPreview
          logo={<img src={powerpointLogoURL} alt="Microsoft PowerPoint logo" />}
        >
          <img
            src={aiDeckTemplateURL}
            alt="Preview of an artificial intelligence slide deck"
          />
        </CardPreview>

        <CardFooter>
          <Button icon={<OpenRegular fontSize={16} />}>View changes</Button>
        </CardFooter>
      </Card>
    </>
  );
};

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions