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>
23 lines
No EOL
1,015 B
Text
23 lines
No EOL
1,015 B
Text
import { SimpleWebpackError } from './simpleWebpackError';
|
|
export function getNextFontError(err, module) {
|
|
try {
|
|
const resourceResolveData = module.resourceResolveData;
|
|
if (!module.loaders.find((loader)=>/next-font-loader[/\\]index.js/.test(loader.loader))) {
|
|
return false;
|
|
}
|
|
// Parse the query and get the path of the file where the font function was called.
|
|
// provided by next-swc next-transform-font
|
|
const file = JSON.parse(resourceResolveData.query.slice(1)).path;
|
|
if (err.name === 'NextFontError') {
|
|
// Known error thrown by @next/font, display the error message
|
|
return new SimpleWebpackError(file, `\`next/font\` error:\n${err.message}`);
|
|
} else {
|
|
// Unknown error thrown by @next/font
|
|
return new SimpleWebpackError(file, `An error occurred in \`next/font\`.\n\n${err.stack}`);
|
|
}
|
|
} catch {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=parseNextFontError.js.map |