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 a105a76 commit 3b8abadCopy full SHA for 3b8abad
index.js
@@ -125,7 +125,9 @@ module.exports = function(content) {
125
content = JSON.stringify(content);
126
}
127
128
- return "module.exports = " + content.replace(/xxxHTMLLINKxxx[0-9\.]+xxx/g, function(match) {
+ var exportsString = config.exportAsEs6Default? "exports.default": "module.exports";
129
+
130
+ return exportsString + " = " + content.replace(/xxxHTMLLINKxxx[0-9\.]+xxx/g, function(match) {
131
if(!data[match]) return match;
132
return '" + require(' + JSON.stringify(loaderUtils.urlToRequest(data[match], root)) + ') + "';
133
}) + ";";
0 commit comments