Rocky_Mountain_Vending/.pnpm-store/v10/files/09/5179e3b0c727fa515e340dc7ada00e7b24432c377cf8a1daf6dad4a8fe0bf4b1ab103a2a0e4d98036e79e91784c147481562813f94691f0d78f0bc2fd93ae2
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

76 lines
No EOL
3.3 KiB
Text

import { getClientStyleLoader } from './client';
import { cssFileResolve } from './file-resolve';
import { getCssModuleLocalIdent } from './getCssModuleLocalIdent';
export function getCssModuleLoader(ctx, postcss, preProcessors = []) {
const loaders = [];
if (ctx.isClient) {
// Add appropriate development more or production mode style
// loader
loaders.push(getClientStyleLoader({
hasAppDir: ctx.hasAppDir,
isAppDir: ctx.isAppDir,
isDevelopment: ctx.isDevelopment,
assetPrefix: ctx.assetPrefix,
experimentalInlineCss: ctx.experimental.inlineCss
}));
}
if (ctx.experimental.useLightningcss) {
loaders.push({
loader: require.resolve('../../../../loaders/lightningcss-loader/src'),
options: {
importLoaders: 1 + preProcessors.length,
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
modules: {
// Do not transform class names (CJS mode backwards compatibility):
exportLocalsConvention: 'asIs',
// Server-side (Node.js) rendering support:
exportOnlyLocals: ctx.isServer
},
targets: ctx.supportedBrowsers,
postcss
}
});
} else {
// Resolve CSS `@import`s and `url()`s
loaders.push({
loader: require.resolve('../../../../loaders/css-loader/src'),
options: {
postcss,
importLoaders: 1 + preProcessors.length,
// Use CJS mode for backwards compatibility:
esModule: false,
url: (url, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
import: (url, _, resourcePath)=>cssFileResolve(url, resourcePath, ctx.experimental.urlImports),
modules: {
// Do not transform class names (CJS mode backwards compatibility):
exportLocalsConvention: 'asIs',
// Server-side (Node.js) rendering support:
exportOnlyLocals: ctx.isServer,
// Disallow global style exports so we can code-split CSS and
// not worry about loading order.
mode: 'pure',
// Generate a friendly production-ready name so it's
// reasonably understandable. The same name is used for
// development.
// TODO: Consider making production reduce this to a single
// character?
getLocalIdent: getCssModuleLocalIdent
}
}
});
// Compile CSS
loaders.push({
loader: require.resolve('../../../../loaders/postcss-loader/src'),
options: {
postcss
}
});
}
loaders.push(// Webpack loaders run like a stack, so we need to reverse the natural
// order of preprocessors.
...preProcessors.slice().reverse());
return loaders;
}
//# sourceMappingURL=modules.js.map