import { webpack } from 'next/dist/compiled/webpack/webpack' import MiniCssExtractPlugin from '../../../../plugins/mini-css-extract-plugin' export function getClientStyleLoader({ isDevelopment, assetPrefix, }: { isDevelopment: boolean assetPrefix: string }): webpack.RuleSetUseItem { return isDevelopment ? { loader: require.resolve('style-loader'), options: { // By default, style-loader injects CSS into the bottom // of . This causes ordering problems between dev // and prod. To fix this, we render a