Skip to content

Commit

Permalink
Fix: Hardcode template loader for htmlLoader
Browse files Browse the repository at this point in the history
This way it can’t be affected by user’s html-loader.

Fix #312
  • Loading branch information
sapegin committed Feb 17, 2017
1 parent aafb2ad commit baf7fec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/make-webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const StyleguidistOptionsPlugin = require('./utils/StyleguidistOptionsPlugin');

const isWebpack2 = getWebpackVersion() === 2;
const sourceDir = path.resolve(__dirname, '../lib');
const htmlLoader = require.resolve('html-webpack-plugin/lib/loader');

module.exports = function(config, env) {
process.env.NODE_ENV = env;
Expand All @@ -36,7 +37,7 @@ module.exports = function(config, env) {
new StyleguidistOptionsPlugin(config),
new HtmlWebpackPlugin({
title: config.title,
template: config.template,
template: `!!${htmlLoader}!${config.template}`,
inject: true,
}),
new webpack.DefinePlugin({
Expand Down

0 comments on commit baf7fec

Please sign in to comment.