Skip to content

Commit

Permalink
fix(loader): Compatibility with webpack 2
Browse files Browse the repository at this point in the history
pug -> pug-loader
  • Loading branch information
Velenir committed Dec 31, 2016
1 parent b55c16e commit 63390f1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ module: {
//...
{
test: /\.pug$/,
loader: 'pug'
loader: 'pug-loader'
}
]
}
```
or explicitly together with the template:

```javascript
template: '!!pug!custom_template.pug'
template: '!!pug-loader!custom_template.pug'
```

Optional parameters:
Expand Down Expand Up @@ -95,7 +95,7 @@ An example of webpack configuration utilizing the options above:
// Required
inject: false,
template: require('html-webpack-template-pug'),
// template: '!!pug!node_modules/html-webpack-template-pug/layout.pug'
// template: '!!pug-loader!node_modules/html-webpack-template-pug/layout.pug'
// Optional
appMountId: 'app',
Expand Down Expand Up @@ -162,7 +162,7 @@ An example of webpack configuration with extracting a CSS-only entry chunk:
// Required
inject: false,
template: require('html-webpack-template-pug'),
// template: '!!pug!node_modules/html-webpack-template-pug/layout.pug'
// template: '!!pug-loader!node_modules/html-webpack-template-pug/layout.pug'
// Optional
excludeJSChunks: 'style', // don't include specific chunks in scripts (when .js is a byproduct of an already extracted .css)
Expand Down Expand Up @@ -247,7 +247,7 @@ An example of webpack configuration with a custom template extending the default
new HtmlWebpackPlugin({
// Required
inject: false,
template: '!!pug!index.pug',
template: '!!pug-loader!index.pug',
// Optional
appMountId: 'app',
mobile: true,
Expand Down Expand Up @@ -438,7 +438,7 @@ An example of webpack configuration with a custom template including the default
new HtmlWebpackPlugin({
// Required
inject: false,
template: '!!pug!index.pug',
template: '!!pug-loader!index.pug',
// Optional
appMountId: 'app',
mobile: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/minimalDev-extends_layout/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: '!!pug!./index.pug',
template: '!!pug-loader!./index.pug',
appMountId: 'app',
mobile: true,
title: 'App',
Expand Down
2 changes: 1 addition & 1 deletion examples/minimalDev-include_mixins/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: '!!pug!./index.pug',
template: '!!pug-loader!./index.pug',
appMountId: 'app',
mobile: true,
title: 'App',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
},
{
test: /\.pug$/,
loader: 'pug'
loader: 'pug-loader'
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/minimalProd-extractCSS/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
},
{
test: /\.pug$/,
loader: 'pug'
loader: 'pug-loader'
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = "!!pug!" + require('path').join(__dirname, 'layout.pug');
module.exports = "!!pug-loader!" + require('path').join(__dirname, 'layout.pug');

0 comments on commit 63390f1

Please sign in to comment.