1.0.0 • Published 3 years ago

@rutan/jst-handlebars-loader v1.0.0

Weekly downloads
44
License
MIT
Repository
github
Last release
3 years ago

jst-handlebars-loader

install

npm install @rutan/jst-handlebars-loader

Usage

install handlebars and this loader.

npm install --dev handlebars @rutan/jst-handlebars-loader

add settings to webpack.config.js

// webpack.config.js

module.exports = {
  module: {
    loaders: [
      {
        test: /\.hbs$/,
        loader: '@rutan/jst-handlebars-loader',
        options: { ... }
      }
    ]
  },
  resolve: {
    alias: {
      'handlebars' : 'handlebars/dist/handlebars.js'
    }
  }
};

Options

name

  • Type: (relativeFilePath: string, absoluteFilePath: string) => string | undefined
  • Default: undefined

basePath

  • Type: string
  • Default: .

global

  • Type: string
  • Default: global