Skip to content

Commit

Permalink
Merge branch 'release/0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
eploko committed Nov 4, 2015
2 parents a348185 + 97c2476 commit 033f07e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pegjs-loader",
"version": "0.2.1",
"version": "0.2.2",
"description": "PEG.js loader for webpack",
"authors": [
"Andrey Subbotin <andrey@subbotin.me> (https://github.com/eploko)",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pegjs from 'pegjs';
import loaderUtils from 'loader-utils';

export default (source) => {
export default function loader(source) {
if (this.cacheable) {
this.cacheable();
}
Expand All @@ -13,4 +13,4 @@ export default (source) => {
const pegOptions = { output: 'source', cache: cacheParserResults };

return `module.exports = ${pegjs.buildParser(source, pegOptions)};`;
};
}

0 comments on commit 033f07e

Please sign in to comment.