Handlebars loading times fs error

  node.js, question

My environment configuration:
npm webpack backbone handlebars

This a few do collocation, but there is a problem

I installed handlebars using npm and then loaded this module into the module.

I tried to load using import define require in three ways, but all reported errors. although I reported errors, I did not report errors when using the runtime as usual. please refer to the expert for advice on posting error messages below

ERROR in ./~/handlebars/lib/index.js
Module not found: Error: Cannot resolve module ‘fs’ in /Elvis/backbone_elvis/node_modules/handlebars/lib
@ ./~/handlebars/lib/index.js 17:11-24

There are no problems loading other installed modules.

nam i handlebars-loader

Then create a template file file.handlebars to save a template for you.
Webpack configuration:

loaders: [
 { test: /\.handlebars$/,
 loader: 'handlebars'
 bracket
 bracket

Require this file in the js file you need.
template=require(xx.handlebars)

You can then use this temlate (data)

Handlebars-loader precompiled the template for you first, so you can improve performance without having to compile on the client side.