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:
File diff suppressed because it is too large
Load Diff
@@ -314,7 +314,7 @@ export default ${componentName}
|
|||||||
await writeFile(filePath, componentContent, "utf8")
|
await writeFile(filePath, componentContent, "utf8")
|
||||||
|
|
||||||
imports.push(
|
imports.push(
|
||||||
`const ${componentName} = lazy(() => import("./generated/${componentName}"))`
|
`import ${componentName} from "./generated/${componentName}"`
|
||||||
)
|
)
|
||||||
parts.push(`${variant.key}: ${componentName}`)
|
parts.push(`${variant.key}: ${componentName}`)
|
||||||
} else {
|
} else {
|
||||||
@@ -345,7 +345,6 @@ export default ${componentName}
|
|||||||
/* AUTO-GENERATED — DO NOT EDIT */
|
/* AUTO-GENERATED — DO NOT EDIT */
|
||||||
|
|
||||||
import type { FunctionComponent, SVGProps } from "react"
|
import type { FunctionComponent, SVGProps } from "react"
|
||||||
import { lazy } from "react"
|
|
||||||
|
|
||||||
${imports.join("\n")}
|
${imports.join("\n")}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user