Merged in chore/icon-suspense-boundary (pull request #3437)
Wrap material icon in a empty suspense boundary * Wrap material icon in a empty suspense boundary * skip lazy loading icons * remove suspense boundary * Don't import lazy from react when generating icon file Approved-by: Linus Flood
This commit is contained in:
@@ -314,7 +314,7 @@ export default ${componentName}
|
||||
await writeFile(filePath, componentContent, "utf8")
|
||||
|
||||
imports.push(
|
||||
`const ${componentName} = lazy(() => import("./generated/${componentName}"))`
|
||||
`import ${componentName} from "./generated/${componentName}"`
|
||||
)
|
||||
parts.push(`${variant.key}: ${componentName}`)
|
||||
} else {
|
||||
@@ -345,7 +345,6 @@ export default ${componentName}
|
||||
/* AUTO-GENERATED — DO NOT EDIT */
|
||||
|
||||
import type { FunctionComponent, SVGProps } from "react"
|
||||
import { lazy } from "react"
|
||||
|
||||
${imports.join("\n")}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user