chore: refine Next.js configuration and improve error handling
- Simplified the Next.js webpack configuration to apply raw-loader for markdown files universally. - Updated build script in package.json to ensure webpack is used during the build process. - Enhanced error logging across various hooks to provide clearer messages when exceptions occur, improving debugging capabilities.
This commit is contained in:
1 parent
655d9c1b45
commit
55749c07e3
12 files changed
+44
-37
No files matched your search
+10
-12
@@ -5,19 +5,17 @@ const nextConfig: NextConfig = {
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
webpack: (config, { isServer }) => {
|
||||
// Adiciona suporte para raw-loader apenas no cliente
|
||||
if (!isServer) {
|
||||
config.module.rules.push({
|
||||
test: /\.md$/,
|
||||
use: {
|
||||
loader: 'raw-loader',
|
||||
options: {
|
||||
esModule: false,
|
||||
},
|
||||
webpack: (config) => {
|
||||
// Adiciona suporte para raw-loader para arquivos .md
|
||||
config.module.rules.push({
|
||||
test: /\.md$/,
|
||||
use: {
|
||||
loader: 'raw-loader',
|
||||
options: {
|
||||
esModule: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
return config;
|
||||
},
|
||||
// Configuração Turbopack: objeto vazio silencia o erro
|
||||
|
||||
Reference in new issue
Block a user