Skip to content

Commit

Permalink
[icons] fix: replace require import with esm import (#5108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Feb 10, 2022
1 parent 2b95830 commit 6ea7e37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/icons/src/iconSvgPaths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

import { pascalCase } from "change-case";

import * as IconSvgPaths16 from "./generated/16px/paths";
import * as IconSvgPaths20 from "./generated/20px/paths";
import type { IconName } from "./iconNames";
import type { PascalCase } from "./type-utils";

/* eslint-disable @typescript-eslint/no-var-requires */
export const IconSvgPaths16 = require("./generated/16px/paths") as Record<PascalCase<IconName>, string[]>;
export const IconSvgPaths20 = require("./generated/20px/paths") as Record<PascalCase<IconName>, string[]>;
/* eslint-enable @typescript-eslint/no-var-requires */
export { IconSvgPaths16, IconSvgPaths20 };

/**
* Type safe string literal conversion of snake-case icon names to PascalCase icon names,
Expand Down

1 comment on commit 6ea7e37

@blueprint-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[icons] fix: replace require import with esm import (#5108)

Previews: documentation | landing | table | modern colors demo

Please sign in to comment.