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.
1 parent 78eb66d commit a21ca81Copy full SHA for a21ca81
src/index.js
@@ -26,11 +26,12 @@ export default function loader(source) {
26
cache: cacheParserResults,
27
optimize: optimizeParser,
28
trace: trace,
29
+ format: 'commonjs',
30
};
31
if (allowedStartRules.length > 0) {
32
pegOptions.allowedStartRules = allowedStartRules;
33
}
34
35
const methodName = (typeof pegjs.generate === 'function') ? 'generate' : 'buildParser';
- return `module.exports = ${pegjs[methodName](source, pegOptions)};`;
36
+ return pegjs[methodName](source, pegOptions);
37
0 commit comments