diff --git a/LICENSE b/LICENSE
index 21e4ca3..7bc1643 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014 Emmanuel Antico
+Copyright (c) 2014 - 2017 Emmanuel Antico
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 011425c..fa2b382 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ A Handlebars template loader for Webpack
- [Options](#options)
- [Prepending filename comment](#prepending-filename-comment)
- [Images](#images)
+ - [Runtime path](#runtime-path)
- [Compilation options](#compilation-options)
- [Macros](#macros)
- [require](#require)
@@ -52,13 +53,13 @@ npm install handlebars-template-loader
```javascript
module.exports = {
//...
-
+
module: {
loaders: [
{ test: /\.hbs/, loader: "handlebars-template-loader" }
]
},
-
+
node: {
fs: "empty" // avoids error messages
}
@@ -134,13 +135,13 @@ require("./helpers.js");
```javascript
// Get Handlebars instance
var Handlebars = require('handlebars-template-loader/runtime');
-
+
// Require partial
var partial = require('path/to/my/_partial.hbs');
-
+
// Register partial
Handlebars.registerPartial('my_partial_name', partial);
-
+
```
@@ -160,7 +161,7 @@ When debugging a large single page app with the DevTools, it's often hard to fin
```javascript
module.exports = {
//...
-
+
module: {
loaders: [
{
@@ -186,7 +187,7 @@ In order to load images you must install either the `file-loader` or the `url-lo
```javascript
module.exports = {
//...
-
+
module: {
loaders: [
//...
@@ -227,7 +228,7 @@ In order to deactivate image processing define the `attributes` option as an emp
```javascript
module.exports = {
//...
-
+
module: {
loaders: [
{
@@ -251,7 +252,7 @@ You could also add which attributes need to be processed in the form of pairs *t
```javascript
module.exports = {
//...
-
+
module: {
loaders: [
{
@@ -301,6 +302,32 @@ module.exports = {
+## Runtime path ##
+
+If you have a custom location for your Handlebars runtime module then you can set that in your `query` object via the `runtimePath` property. This is the path to the Handlebars runtime that every `.hbs` file will require and use. By default this loader looks up the absolute path to the `handlebars/runtime` in your `node_modules` folder. Changing this property is useful if you are doing somethign non-standard with your Handlebar templates, for example setting an alias for the `handlebars/runtime` path.
+
+
+
+```javascript
+module.exports = {
+ //...
+
+ module: {
+ loaders: [
+ {
+ test: /\.html$/,
+ loader: "handlebars-template-loader",
+ query: {
+ runtimePath: 'handlebars/runtime'
+ }
+ }
+ ]
+ }
+};
+```
+
+
+
## Compilation options ##
@@ -410,7 +437,7 @@ module.exports = {
{ test: /\.hbs/, loader: "handlebars-template-loader" },
}
},
-
+
macros: {
copyright: function () {
return "'
Copyright FakeCorp 2014 - 2015
'"; @@ -444,7 +471,7 @@ You can disable macros if you are a bit unsure about their usage or just simply ```javascript module.exports = { // ... - + module: { loaders: { // ... @@ -481,7 +508,7 @@ module.exports = { { test: /\.html$/, loader: "handlebars-template-loader" }, } }, - + macros: { header: function (size, content) { return "'