Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

knockout-template-loader

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knockout-template-loader

Knockout html template loader for webpack

  • 2.0.0-webpack4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
181
decreased by-1.63%
Maintainers
7
Weekly downloads
 
Created
Source

Knockout Template Loader for Webpack

This is a webpack loader that will load knockout templates from html files. When chained with the html loader, it utilizes the stringTemplateEngine by Ryan Niemeyer to load the html template and make it available to knockout's template parsing logic.

Install

npm install knockout-template-loader --save-dev

Usage

Either add it to your global webpack.config.js:

{
	module: {
		loaders: [{
			test: /\.html$/,
			loader: "knockout-template!html"
		}]
	}
}

or, if you don't want to use it globally, on a case-by-case basis:

require("knockout-template!html!./my-template-file.html");

By default, it will make the template available to knockout using the template's file name. If you want to override that, you can specify the name parameter:

require("knockout-template?name=myBetterName!html!./my-template-file.html");

FAQs

Package last updated on 04 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc