Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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