Skip to content

Commit

Permalink
Allow the package to be required directly to template (#10)
Browse files Browse the repository at this point in the history
`template: require('html-webpack-template')` should work now.

Closes #9.
  • Loading branch information
bebraw authored and jaketrent committed May 10, 2016
1 parent faac42d commit b37e5c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Here's an example webpack config illustrating how to use these options in your `
new HtmlWebpackPlugin({
// Required
inject: false,
template: 'node_modules/html-webpack-template/index.ejs',
template: require('html-webpack-template'),
//template: 'node_modules/html-webpack-template/index.ejs',

// Optional
appMountId: 'app',
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('path').join(__dirname, 'index.ejs');
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "html-webpack-template",
"version": "4.0.0",
"description": "A template with more features than the default html-webpack-plugin template",
"main": "index.ejs",
"main": "index.js",
"scripts": {
"commit": "git-cz",
"test": "echo \"Everything is fine. No tests here.\" && exit 0",
Expand Down

0 comments on commit b37e5c4

Please sign in to comment.