import { getRspackCore } from '../../../../../../shared/lib/get-rspack';
export function getClientStyleLoader({ hasAppDir, isAppDir, isDevelopment, assetPrefix }) {
const isRspack = Boolean(process.env.NEXT_RSPACK);
const shouldEnableApp = typeof isAppDir === 'boolean' ? isAppDir : hasAppDir;
// Keep next-style-loader for development mode in `pages/`
if (isDevelopment && !shouldEnableApp) {
return {
loader: 'next-style-loader',
options: {
insert: function(element) {
// By default, style-loader injects CSS into the bottom
// of . This causes ordering problems between dev
// and prod. To fix this, we render a