From 44943629592efeb80a50d3a812412d06bf61b1d9 Mon Sep 17 00:00:00 2001 From: Hiroki Osame Date: Sun, 20 Sep 2020 18:38:26 -0400 Subject: [PATCH] fix: add esm interop --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 4adcd219..1eac8211 100644 --- a/index.js +++ b/index.js @@ -36,6 +36,7 @@ module.exports.pitch = function (remainingRequest) { '', '// load the styles', 'var content = require(' + request + ');', + "if ('default' in content) { content = content.default; }", // content list format is [id, css, media, sourceMap] "if(typeof content === 'string') content = [[module.id, content, '']];", 'if(content.locals) module.exports = content.locals;'