I'm clone project and run it under Windows 11,
I see this error during compilation:
Compiling /page ...
⚠ ./node_modules/handlebars/lib/index.js
require.extensions is not supported by webpack. Use a loader instead.
Import trace for requested module:
./node_modules/handlebars/lib/index.js
./src/lib/compile-template.ts
./src/app/page.tsx
I was solved this problem this way:
1.
add package:
npm i -D handlebars-loader
I'm clone project and run it under Windows 11, I see this error during compilation:
I was solved this problem this way: 1. add package:
npm i -D handlebars-loader
module.exports = { webpack: (config) => { config.module.rules.push({ test: /.hbs$/, loader: 'handlebars-loader', include: path.resolve(__dirname, 'src'), }); config.resolve.alias = { ...config.resolve.alias, handlebars: 'handlebars/dist/handlebars.min.js' }
};