From 20854cab0e7307931d21ef54f744ac5a2df4c3ef Mon Sep 17 00:00:00 2001 From: Kees Kluskens Date: Thu, 27 Oct 2016 11:55:49 +0200 Subject: [PATCH] Export an ES Module instead of CommonJS module Since webpack v2, it's better to use ES modules. Note that this is incompatible with webpack v1, so it should be released as a major version. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a59e712..f1c95c6 100644 --- a/index.js +++ b/index.js @@ -5,5 +5,5 @@ module.exports = function(content) { this.cacheable && this.cacheable(); this.value = content; - return "module.exports = " + JSON.stringify(content); + return "export default " + JSON.stringify(content); }