Skip to content

Commit

Permalink
[fix] to absolute path, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredleechn committed Aug 3, 2016
1 parent d5e4652 commit 5cc473e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index-webpack-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { readFileSync, existsSync } from 'fs';
import { render } from 'ejs';
import { join } from 'path';
import { marked } from 'atool-doc-util';
const root = join(__dirname, '..');

function addContentToAssets(content, filename, compilation) {
const assets = { compilation };
const { assets } = compilation;
assets[filename] = {
source: () => content,
size: () => content.length,
Expand All @@ -24,7 +25,7 @@ export default function IndexWebpackPlugin(options) {
fileDependencies: ['package.json', 'README.md', 'HISTORY.md', 'CHANGELOG.md'],
contextDependencies: [],
file: 'index.html',
template: 'tpl/index.ejs',
template: join(root, 'tpl/index.ejs'),
params: {
title: 'index.html',
},
Expand Down

0 comments on commit 5cc473e

Please sign in to comment.