File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
packages/next/src/shared/lib Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -137,29 +137,6 @@ function reduceComponents<T extends {} & WithInAmpMode>(
137137 . reverse ( )
138138 . map ( ( c : React . ReactElement < any > , i : number ) => {
139139 const key = c . key || i
140- if (
141- process . env . NODE_ENV !== 'development' &&
142- process . env . __NEXT_OPTIMIZE_FONTS &&
143- ! inAmpMode
144- ) {
145- if (
146- c . type === 'link' &&
147- c . props [ 'href' ] &&
148- // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
149- [ 'https://fonts.googleapis.com/css' , 'https://use.typekit.net/' ] . some (
150- ( url ) => c . props [ 'href' ] . startsWith ( url )
151- )
152- ) {
153- const newProps = { ...( c . props || { } ) }
154- newProps [ 'data-href' ] = newProps [ 'href' ]
155- newProps [ 'href' ] = undefined
156-
157- // Add this attribute to make it easy to identify optimized tags
158- newProps [ 'data-optimized-fonts' ] = true
159-
160- return React . cloneElement ( c , newProps )
161- }
162- }
163140 if ( process . env . NODE_ENV === 'development' ) {
164141 // omit JSON-LD structured data snippets from the warning
165142 if ( c . type === 'script' && c . props [ 'type' ] !== 'application/ld+json' ) {
You can’t perform that action at this time.
0 commit comments