grunt-es6-module-wrap-default
Advanced tools
Comparing version 0.1.1 to 0.2.0
{ | ||
"name": "grunt-es6-module-wrap-default", | ||
"description": "Wrap CommonJS and AMD modules created with es6-module-transpiler so that they can be required as ('name') and not ('name').default", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"homepage": "https://github.com/stevoland/grunt-es6-module-wrap-default", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -52,3 +52,3 @@ /* | ||
case 'cjs': | ||
src = "var " + srcBaseName + " = require('./" + importPath + "').default;\n" + | ||
src = "var " + srcBaseName + " = require('./" + importPath + "')['default'];\n" + | ||
"module.exports = " + srcBaseName; | ||
@@ -59,3 +59,3 @@ break; | ||
src = "define(['./" + importPath + "'], function (" + srcBaseName + ") {\n" + | ||
" return " + srcBaseName + ".default;\n" + | ||
" return " + srcBaseName + "['default'];\n" + | ||
"})"; | ||
@@ -62,0 +62,0 @@ break; |
9564