You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the import for Polaris is done at the app.js/.tsx level for a Next.js project, this means pulling in the entirety of the Polaris framework's CSS, regardless of how much you use.
I have tested using the basic setup of PurgeCSS suggested in their documentation for a Next.js project, but the purging is too aggressive and breaks the layout. However, the payload for the application shrinks by 400kb in a production build. So, would I would like to be able to achieve a reasonable degree of optimization.
Has anyone had success in accomplishing this with a Polaris + Next.js project?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Since the import for Polaris is done at the app.js/.tsx level for a Next.js project, this means pulling in the entirety of the Polaris framework's CSS, regardless of how much you use.
I have tested using the basic setup of PurgeCSS suggested in their documentation for a Next.js project, but the purging is too aggressive and breaks the layout. However, the payload for the application shrinks by 400kb in a production build. So, would I would like to be able to achieve a reasonable degree of optimization.
Has anyone had success in accomplishing this with a Polaris + Next.js project?
Beta Was this translation helpful? Give feedback.
All reactions