We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 07998e7 + 8f78844 commit 86ae66fCopy full SHA for 86ae66f
src/index.js
@@ -23,16 +23,17 @@ export default function loader(source) {
23
24
// Description of PEG.js options: https://github.com/pegjs/pegjs#javascript-api
25
const pegOptions = {
26
- output: 'source',
27
cache: cacheParserResults,
+ dependencies: dependencies,
28
+ format: 'commonjs',
29
optimize: optimizeParser,
30
+ output: 'source',
31
trace: trace,
- dependencies: dependencies,
32
};
33
if (allowedStartRules.length > 0) {
34
pegOptions.allowedStartRules = allowedStartRules;
35
}
36
37
const methodName = (typeof pegjs.generate === 'function') ? 'generate' : 'buildParser';
- return `module.exports = ${pegjs[methodName](source, pegOptions)};`;
38
+ return pegjs[methodName](source, pegOptions);
39
0 commit comments