rollup
Advanced tools
Comparing version 0.6.3 to 0.6.4
# rollup changelog | ||
## 0.6.4 | ||
* Fix CJS bundling with default export | ||
## 0.6.3 | ||
@@ -4,0 +8,0 @@ |
@@ -1158,5 +1158,6 @@ 'use strict'; | ||
var cjsExport = exportMode === 'default' ? 'module.exports = ' : ''; | ||
var defaultExport = exportMode === 'default' ? 'global.' + options.moduleName + ' = ' : ''; | ||
var intro = ('(function (global, factory) {\n\t\t\ttypeof exports === \'object\' && typeof module !== \'undefined\' ? factory(' + cjsDeps.join(', ') + ') :\n\t\t\ttypeof define === \'function\' && define.amd ? define(' + amdParams + 'factory) :\n\t\t\t' + defaultExport + 'factory(' + globalDeps + ');\n\t\t}(this, function (' + args + ') { \'use strict\';\n\n\t\t').replace(/^\t\t/gm, '').replace(/^\t/gm, indentStr); | ||
var intro = ('(function (global, factory) {\n\t\t\ttypeof exports === \'object\' && typeof module !== \'undefined\' ? ' + cjsExport + 'factory(' + cjsDeps.join(', ') + ') :\n\t\t\ttypeof define === \'function\' && define.amd ? define(' + amdParams + 'factory) :\n\t\t\t' + defaultExport + 'factory(' + globalDeps + ');\n\t\t}(this, function (' + args + ') { \'use strict\';\n\n\t\t').replace(/^\t\t/gm, '').replace(/^\t/gm, indentStr); | ||
@@ -1163,0 +1164,0 @@ var exports = bundle.entryModule.exports; |
{ | ||
"name": "rollup", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Next-generation ES6 module bundler", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup.js", |
@@ -29,2 +29,3 @@ import { has } from '../utils/object'; | ||
const cjsExport = exportMode === 'default' ? `module.exports = ` : ``; | ||
const defaultExport = exportMode === 'default' ? `global.${options.moduleName} = ` : ''; | ||
@@ -34,3 +35,3 @@ | ||
`(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(${cjsDeps.join( ', ' )}) : | ||
typeof exports === 'object' && typeof module !== 'undefined' ? ${cjsExport}factory(${cjsDeps.join( ', ' )}) : | ||
typeof define === 'function' && define.amd ? define(${amdParams}factory) : | ||
@@ -37,0 +38,0 @@ ${defaultExport}factory(${globalDeps}); |
Sorry, the diff of this file is not supported yet
183090
2668