rollup 0.52.2 → 0.52.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/bin/rollup +1 -1
- package/dist/rollup.browser.js +34 -14
- package/dist/rollup.es.js +34 -14
- package/dist/rollup.js +34 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.52.3
|
|
4
|
+
* Properly hoist default exported functions in more situations ([#1799](https://github.com/rollup/rollup/pull/1799))
|
|
5
|
+
* Allow plugin transformations to not overwrite source maps by returning null ([#1797](https://github.com/rollup/rollup/pull/1797))
|
|
6
|
+
* Provide more parameters to "external" handler ([#1792](https://github.com/rollup/rollup/pull/1792))
|
|
7
|
+
|
|
3
8
|
## 0.52.2
|
|
4
9
|
* No longer ignore side-effects in JSON.parse and JSON.stringify ([#1785](https://github.com/rollup/rollup/pull/1785))
|
|
5
10
|
* Updated links in warnings ([#1776](https://github.com/rollup/rollup/pull/1776))
|
package/bin/rollup
CHANGED
|
@@ -250,7 +250,7 @@ function isNumber (x) {
|
|
|
250
250
|
|
|
251
251
|
var help = "rollup version __VERSION__\n=====================================\n\nUsage: rollup [options] <entry file>\n\nBasic options:\n\n-v, --version Show version number\n-h, --help Show this help message\n-c, --config Use this config file (if argument is used but value\n is unspecified, defaults to rollup.config.js)\n-w, --watch Watch files in bundle and rebuild on changes\n-i, --input Input (alternative to <entry file>)\n-o, --output.file <output> Output (if absent, prints to stdout)\n-f, --output.format [es] Type of output (amd, cjs, es, iife, umd)\n-e, --external Comma-separate list of module IDs to exclude\n-g, --globals Comma-separate list of `module ID:Global` pairs\n Any module IDs defined here are added to external\n-n, --name Name for UMD export\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-l, --legacy Support IE8\n--amd.id ID for AMD module (default is anonymous)\n--amd.define Function to use in place of `define`\n--no-strict Don't emit a `\"use strict\";` in the generated modules.\n--no-indent Don't indent result\n--environment <values> Settings passed to config file (see example)\n--no-conflict Generate a noConflict method for UMD globals\n--no-treeshake Disable tree-shaking\n--silent Don't print warnings\n--intro Content to insert at top of bundle (inside wrapper)\n--outro Content to insert at end of bundle (inside wrapper)\n--banner Content to insert at top of bundle (outside wrapper)\n--footer Content to insert at end of bundle (outside wrapper)\n--interop Include interop block (true by default)\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --output=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
|
252
252
|
|
|
253
|
-
var version = "0.52.
|
|
253
|
+
var version = "0.52.3";
|
|
254
254
|
|
|
255
255
|
var modules = {};
|
|
256
256
|
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.52.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.52.3
|
|
3
|
+
Tue Dec 19 2017 11:30:33 GMT+0100 (CET) - commit a9c8ae524e61030d22e564e8f02b5c46cd4f353c
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -12230,6 +12230,19 @@ class ExportAllDeclaration extends Node$1 {
|
|
|
12230
12230
|
|
|
12231
12231
|
const functionOrClassDeclaration = /^(?:Function|Class)Declaration/;
|
|
12232
12232
|
|
|
12233
|
+
function buildRegexWithSpaces (re) {
|
|
12234
|
+
const spaceOrComment = "(?:" + [
|
|
12235
|
+
/\s/.source, // Space
|
|
12236
|
+
/\/\/.*[\n\r]/.source, // Single line comment
|
|
12237
|
+
/\/\*[^]*?\*\//.source ].join( "|" ) + ")";
|
|
12238
|
+
return new RegExp( re.source.replace( /\s|\\s/g, spaceOrComment ), re.flags );
|
|
12239
|
+
}
|
|
12240
|
+
|
|
12241
|
+
const sourceRE = {
|
|
12242
|
+
exportDefault: buildRegexWithSpaces( /^ *export +default */ ),
|
|
12243
|
+
declarationHeader: buildRegexWithSpaces( /^ *export +default +(?:(?:async +)?function(?: *\*)?|class)/ ),
|
|
12244
|
+
};
|
|
12245
|
+
|
|
12233
12246
|
class ExportDefaultDeclaration extends Node$1 {
|
|
12234
12247
|
bindNode () {
|
|
12235
12248
|
if ( this._declarationName ) {
|
|
@@ -12258,13 +12271,13 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12258
12271
|
render ( code, es ) {
|
|
12259
12272
|
const remove = () => { code.remove( this.leadingCommentStart || this.start, this.next || this.end ); };
|
|
12260
12273
|
const removeExportDefault = () => { code.remove( this.start, declaration_start ); };
|
|
12261
|
-
|
|
12274
|
+
|
|
12262
12275
|
const treeshakeable = this.module.bundle.treeshake && !this.included && !this.declaration.included;
|
|
12263
12276
|
const name = this.variable.getName( es );
|
|
12264
12277
|
const statementStr = code.original.slice( this.start, this.end );
|
|
12265
12278
|
|
|
12266
12279
|
// paren workaround: find first non-whitespace character position after `export default`
|
|
12267
|
-
const declaration_start = this.start + statementStr.match(
|
|
12280
|
+
const declaration_start = this.start + statementStr.match( sourceRE.exportDefault )[ 0 ].length;
|
|
12268
12281
|
|
|
12269
12282
|
if ( functionOrClassDeclaration.test(this.declaration.type) ) {
|
|
12270
12283
|
if ( treeshakeable ) {
|
|
@@ -12273,7 +12286,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12273
12286
|
|
|
12274
12287
|
// Add the id to anonymous declarations
|
|
12275
12288
|
if ( !this.declaration.id ) {
|
|
12276
|
-
const id_insertPos = this.start + statementStr.match(
|
|
12289
|
+
const id_insertPos = this.start + statementStr.match( sourceRE.declarationHeader )[ 0 ].length;
|
|
12277
12290
|
code.appendLeft( id_insertPos, ` ${name}` );
|
|
12278
12291
|
}
|
|
12279
12292
|
|
|
@@ -12296,7 +12309,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12296
12309
|
removeExportDefault();
|
|
12297
12310
|
}
|
|
12298
12311
|
}
|
|
12299
|
-
|
|
12312
|
+
|
|
12300
12313
|
super.render( code, es );
|
|
12301
12314
|
}
|
|
12302
12315
|
}
|
|
@@ -17593,8 +17606,8 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17593
17606
|
if ( typeof result === 'string' ) {
|
|
17594
17607
|
result = {
|
|
17595
17608
|
code: result,
|
|
17596
|
-
ast:
|
|
17597
|
-
map:
|
|
17609
|
+
ast: undefined,
|
|
17610
|
+
map: undefined
|
|
17598
17611
|
};
|
|
17599
17612
|
}
|
|
17600
17613
|
|
|
@@ -17607,7 +17620,11 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17607
17620
|
result.map.mappings = decode$$1( result.map.mappings );
|
|
17608
17621
|
}
|
|
17609
17622
|
|
|
17610
|
-
|
|
17623
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17624
|
+
if ( result.map !== null ) {
|
|
17625
|
+
sourcemapChain.push( result.map || { missing: true, plugin: plugin.name });
|
|
17626
|
+
}
|
|
17627
|
+
|
|
17611
17628
|
ast = result.ast;
|
|
17612
17629
|
|
|
17613
17630
|
return result.code;
|
|
@@ -17635,7 +17652,7 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17635
17652
|
if ( typeof result === 'string' ) {
|
|
17636
17653
|
result = {
|
|
17637
17654
|
code: result,
|
|
17638
|
-
map:
|
|
17655
|
+
map: undefined
|
|
17639
17656
|
};
|
|
17640
17657
|
}
|
|
17641
17658
|
|
|
@@ -17644,7 +17661,10 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17644
17661
|
map.mappings = decode$$1( map.mappings );
|
|
17645
17662
|
}
|
|
17646
17663
|
|
|
17647
|
-
|
|
17664
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17665
|
+
if ( map !== null ) {
|
|
17666
|
+
sourcemapChain.push( map || { missing: true, plugin: plugin.name });
|
|
17667
|
+
}
|
|
17648
17668
|
|
|
17649
17669
|
return result.code;
|
|
17650
17670
|
}).catch( err => {
|
|
@@ -17967,7 +17987,7 @@ class Bundle$$1 {
|
|
|
17967
17987
|
}
|
|
17968
17988
|
|
|
17969
17989
|
this.resolveId = first(
|
|
17970
|
-
[ id => this.isExternal( id ) ? false : null ]
|
|
17990
|
+
[ ( id, parentId ) => this.isExternal( id, parentId, false ) ? false : null ]
|
|
17971
17991
|
.concat( this.plugins.map( plugin => plugin.resolveId ).filter( Boolean ) )
|
|
17972
17992
|
.concat( resolveId )
|
|
17973
17993
|
);
|
|
@@ -18317,7 +18337,7 @@ class Bundle$$1 {
|
|
|
18317
18337
|
return ( resolvedId ? Promise.resolve( resolvedId ) : this.resolveId( source, module.id ) )
|
|
18318
18338
|
.then( resolvedId => {
|
|
18319
18339
|
const externalId = resolvedId || (isRelative( source ) ? resolve( module.id, '..', source ) : source);
|
|
18320
|
-
let isExternal = this.isExternal( externalId );
|
|
18340
|
+
let isExternal = this.isExternal( externalId, module.id, true );
|
|
18321
18341
|
|
|
18322
18342
|
if ( !resolvedId && !isExternal ) {
|
|
18323
18343
|
if ( isRelative( source ) ) {
|
|
@@ -18825,7 +18845,7 @@ function rollup ( inputOptions ) {
|
|
|
18825
18845
|
}
|
|
18826
18846
|
}
|
|
18827
18847
|
|
|
18828
|
-
var version$1 = "0.52.
|
|
18848
|
+
var version$1 = "0.52.3";
|
|
18829
18849
|
|
|
18830
18850
|
exports.rollup = rollup;
|
|
18831
18851
|
exports.VERSION = version$1;
|
package/dist/rollup.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.52.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.52.3
|
|
3
|
+
Tue Dec 19 2017 11:30:33 GMT+0100 (CET) - commit a9c8ae524e61030d22e564e8f02b5c46cd4f353c
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -12182,6 +12182,19 @@ class ExportAllDeclaration extends Node$1 {
|
|
|
12182
12182
|
|
|
12183
12183
|
const functionOrClassDeclaration = /^(?:Function|Class)Declaration/;
|
|
12184
12184
|
|
|
12185
|
+
function buildRegexWithSpaces (re) {
|
|
12186
|
+
const spaceOrComment = "(?:" + [
|
|
12187
|
+
/\s/.source, // Space
|
|
12188
|
+
/\/\/.*[\n\r]/.source, // Single line comment
|
|
12189
|
+
/\/\*[^]*?\*\//.source ].join( "|" ) + ")";
|
|
12190
|
+
return new RegExp( re.source.replace( /\s|\\s/g, spaceOrComment ), re.flags );
|
|
12191
|
+
}
|
|
12192
|
+
|
|
12193
|
+
const sourceRE = {
|
|
12194
|
+
exportDefault: buildRegexWithSpaces( /^ *export +default */ ),
|
|
12195
|
+
declarationHeader: buildRegexWithSpaces( /^ *export +default +(?:(?:async +)?function(?: *\*)?|class)/ ),
|
|
12196
|
+
};
|
|
12197
|
+
|
|
12185
12198
|
class ExportDefaultDeclaration extends Node$1 {
|
|
12186
12199
|
bindNode () {
|
|
12187
12200
|
if ( this._declarationName ) {
|
|
@@ -12210,13 +12223,13 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12210
12223
|
render ( code, es ) {
|
|
12211
12224
|
const remove = () => { code.remove( this.leadingCommentStart || this.start, this.next || this.end ); };
|
|
12212
12225
|
const removeExportDefault = () => { code.remove( this.start, declaration_start ); };
|
|
12213
|
-
|
|
12226
|
+
|
|
12214
12227
|
const treeshakeable = this.module.bundle.treeshake && !this.included && !this.declaration.included;
|
|
12215
12228
|
const name = this.variable.getName( es );
|
|
12216
12229
|
const statementStr = code.original.slice( this.start, this.end );
|
|
12217
12230
|
|
|
12218
12231
|
// paren workaround: find first non-whitespace character position after `export default`
|
|
12219
|
-
const declaration_start = this.start + statementStr.match(
|
|
12232
|
+
const declaration_start = this.start + statementStr.match( sourceRE.exportDefault )[ 0 ].length;
|
|
12220
12233
|
|
|
12221
12234
|
if ( functionOrClassDeclaration.test(this.declaration.type) ) {
|
|
12222
12235
|
if ( treeshakeable ) {
|
|
@@ -12225,7 +12238,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12225
12238
|
|
|
12226
12239
|
// Add the id to anonymous declarations
|
|
12227
12240
|
if ( !this.declaration.id ) {
|
|
12228
|
-
const id_insertPos = this.start + statementStr.match(
|
|
12241
|
+
const id_insertPos = this.start + statementStr.match( sourceRE.declarationHeader )[ 0 ].length;
|
|
12229
12242
|
code.appendLeft( id_insertPos, ` ${name}` );
|
|
12230
12243
|
}
|
|
12231
12244
|
|
|
@@ -12248,7 +12261,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12248
12261
|
removeExportDefault();
|
|
12249
12262
|
}
|
|
12250
12263
|
}
|
|
12251
|
-
|
|
12264
|
+
|
|
12252
12265
|
super.render( code, es );
|
|
12253
12266
|
}
|
|
12254
12267
|
}
|
|
@@ -17545,8 +17558,8 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17545
17558
|
if ( typeof result === 'string' ) {
|
|
17546
17559
|
result = {
|
|
17547
17560
|
code: result,
|
|
17548
|
-
ast:
|
|
17549
|
-
map:
|
|
17561
|
+
ast: undefined,
|
|
17562
|
+
map: undefined
|
|
17550
17563
|
};
|
|
17551
17564
|
}
|
|
17552
17565
|
|
|
@@ -17559,7 +17572,11 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17559
17572
|
result.map.mappings = decode$$1( result.map.mappings );
|
|
17560
17573
|
}
|
|
17561
17574
|
|
|
17562
|
-
|
|
17575
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17576
|
+
if ( result.map !== null ) {
|
|
17577
|
+
sourcemapChain.push( result.map || { missing: true, plugin: plugin.name });
|
|
17578
|
+
}
|
|
17579
|
+
|
|
17563
17580
|
ast = result.ast;
|
|
17564
17581
|
|
|
17565
17582
|
return result.code;
|
|
@@ -17587,7 +17604,7 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17587
17604
|
if ( typeof result === 'string' ) {
|
|
17588
17605
|
result = {
|
|
17589
17606
|
code: result,
|
|
17590
|
-
map:
|
|
17607
|
+
map: undefined
|
|
17591
17608
|
};
|
|
17592
17609
|
}
|
|
17593
17610
|
|
|
@@ -17596,7 +17613,10 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17596
17613
|
map.mappings = decode$$1( map.mappings );
|
|
17597
17614
|
}
|
|
17598
17615
|
|
|
17599
|
-
|
|
17616
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17617
|
+
if ( map !== null ) {
|
|
17618
|
+
sourcemapChain.push( map || { missing: true, plugin: plugin.name });
|
|
17619
|
+
}
|
|
17600
17620
|
|
|
17601
17621
|
return result.code;
|
|
17602
17622
|
}).catch( err => {
|
|
@@ -17919,7 +17939,7 @@ class Bundle$$1 {
|
|
|
17919
17939
|
}
|
|
17920
17940
|
|
|
17921
17941
|
this.resolveId = first(
|
|
17922
|
-
[ id => this.isExternal( id ) ? false : null ]
|
|
17942
|
+
[ ( id, parentId ) => this.isExternal( id, parentId, false ) ? false : null ]
|
|
17923
17943
|
.concat( this.plugins.map( plugin => plugin.resolveId ).filter( Boolean ) )
|
|
17924
17944
|
.concat( resolveId )
|
|
17925
17945
|
);
|
|
@@ -18269,7 +18289,7 @@ class Bundle$$1 {
|
|
|
18269
18289
|
return ( resolvedId ? Promise.resolve( resolvedId ) : this.resolveId( source, module.id ) )
|
|
18270
18290
|
.then( resolvedId => {
|
|
18271
18291
|
const externalId = resolvedId || (isRelative( source ) ? resolve( module.id, '..', source ) : source);
|
|
18272
|
-
let isExternal = this.isExternal( externalId );
|
|
18292
|
+
let isExternal = this.isExternal( externalId, module.id, true );
|
|
18273
18293
|
|
|
18274
18294
|
if ( !resolvedId && !isExternal ) {
|
|
18275
18295
|
if ( isRelative( source ) ) {
|
|
@@ -22609,7 +22629,7 @@ function watch$1(configs) {
|
|
|
22609
22629
|
return new Watcher(configs);
|
|
22610
22630
|
}
|
|
22611
22631
|
|
|
22612
|
-
var version$1 = "0.52.
|
|
22632
|
+
var version$1 = "0.52.3";
|
|
22613
22633
|
|
|
22614
22634
|
export { rollup, watch$1 as watch, version$1 as VERSION };
|
|
22615
22635
|
//# sourceMappingURL=rollup.es.js.map
|
package/dist/rollup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.52.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.52.3
|
|
3
|
+
Tue Dec 19 2017 11:30:33 GMT+0100 (CET) - commit a9c8ae524e61030d22e564e8f02b5c46cd4f353c
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -12189,6 +12189,19 @@ class ExportAllDeclaration extends Node$1 {
|
|
|
12189
12189
|
|
|
12190
12190
|
const functionOrClassDeclaration = /^(?:Function|Class)Declaration/;
|
|
12191
12191
|
|
|
12192
|
+
function buildRegexWithSpaces (re) {
|
|
12193
|
+
const spaceOrComment = "(?:" + [
|
|
12194
|
+
/\s/.source, // Space
|
|
12195
|
+
/\/\/.*[\n\r]/.source, // Single line comment
|
|
12196
|
+
/\/\*[^]*?\*\//.source ].join( "|" ) + ")";
|
|
12197
|
+
return new RegExp( re.source.replace( /\s|\\s/g, spaceOrComment ), re.flags );
|
|
12198
|
+
}
|
|
12199
|
+
|
|
12200
|
+
const sourceRE = {
|
|
12201
|
+
exportDefault: buildRegexWithSpaces( /^ *export +default */ ),
|
|
12202
|
+
declarationHeader: buildRegexWithSpaces( /^ *export +default +(?:(?:async +)?function(?: *\*)?|class)/ ),
|
|
12203
|
+
};
|
|
12204
|
+
|
|
12192
12205
|
class ExportDefaultDeclaration extends Node$1 {
|
|
12193
12206
|
bindNode () {
|
|
12194
12207
|
if ( this._declarationName ) {
|
|
@@ -12217,13 +12230,13 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12217
12230
|
render ( code, es ) {
|
|
12218
12231
|
const remove = () => { code.remove( this.leadingCommentStart || this.start, this.next || this.end ); };
|
|
12219
12232
|
const removeExportDefault = () => { code.remove( this.start, declaration_start ); };
|
|
12220
|
-
|
|
12233
|
+
|
|
12221
12234
|
const treeshakeable = this.module.bundle.treeshake && !this.included && !this.declaration.included;
|
|
12222
12235
|
const name = this.variable.getName( es );
|
|
12223
12236
|
const statementStr = code.original.slice( this.start, this.end );
|
|
12224
12237
|
|
|
12225
12238
|
// paren workaround: find first non-whitespace character position after `export default`
|
|
12226
|
-
const declaration_start = this.start + statementStr.match(
|
|
12239
|
+
const declaration_start = this.start + statementStr.match( sourceRE.exportDefault )[ 0 ].length;
|
|
12227
12240
|
|
|
12228
12241
|
if ( functionOrClassDeclaration.test(this.declaration.type) ) {
|
|
12229
12242
|
if ( treeshakeable ) {
|
|
@@ -12232,7 +12245,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12232
12245
|
|
|
12233
12246
|
// Add the id to anonymous declarations
|
|
12234
12247
|
if ( !this.declaration.id ) {
|
|
12235
|
-
const id_insertPos = this.start + statementStr.match(
|
|
12248
|
+
const id_insertPos = this.start + statementStr.match( sourceRE.declarationHeader )[ 0 ].length;
|
|
12236
12249
|
code.appendLeft( id_insertPos, ` ${name}` );
|
|
12237
12250
|
}
|
|
12238
12251
|
|
|
@@ -12255,7 +12268,7 @@ class ExportDefaultDeclaration extends Node$1 {
|
|
|
12255
12268
|
removeExportDefault();
|
|
12256
12269
|
}
|
|
12257
12270
|
}
|
|
12258
|
-
|
|
12271
|
+
|
|
12259
12272
|
super.render( code, es );
|
|
12260
12273
|
}
|
|
12261
12274
|
}
|
|
@@ -17552,8 +17565,8 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17552
17565
|
if ( typeof result === 'string' ) {
|
|
17553
17566
|
result = {
|
|
17554
17567
|
code: result,
|
|
17555
|
-
ast:
|
|
17556
|
-
map:
|
|
17568
|
+
ast: undefined,
|
|
17569
|
+
map: undefined
|
|
17557
17570
|
};
|
|
17558
17571
|
}
|
|
17559
17572
|
|
|
@@ -17566,7 +17579,11 @@ function transform ( bundle, source, id, plugins ) {
|
|
|
17566
17579
|
result.map.mappings = decode$$1( result.map.mappings );
|
|
17567
17580
|
}
|
|
17568
17581
|
|
|
17569
|
-
|
|
17582
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17583
|
+
if ( result.map !== null ) {
|
|
17584
|
+
sourcemapChain.push( result.map || { missing: true, plugin: plugin.name });
|
|
17585
|
+
}
|
|
17586
|
+
|
|
17570
17587
|
ast = result.ast;
|
|
17571
17588
|
|
|
17572
17589
|
return result.code;
|
|
@@ -17594,7 +17611,7 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17594
17611
|
if ( typeof result === 'string' ) {
|
|
17595
17612
|
result = {
|
|
17596
17613
|
code: result,
|
|
17597
|
-
map:
|
|
17614
|
+
map: undefined
|
|
17598
17615
|
};
|
|
17599
17616
|
}
|
|
17600
17617
|
|
|
@@ -17603,7 +17620,10 @@ function transformBundle ( code, plugins, sourcemapChain, options ) {
|
|
|
17603
17620
|
map.mappings = decode$$1( map.mappings );
|
|
17604
17621
|
}
|
|
17605
17622
|
|
|
17606
|
-
|
|
17623
|
+
// strict null check allows 'null' maps to not be pushed to the chain, while 'undefined' gets the missing map warning
|
|
17624
|
+
if ( map !== null ) {
|
|
17625
|
+
sourcemapChain.push( map || { missing: true, plugin: plugin.name });
|
|
17626
|
+
}
|
|
17607
17627
|
|
|
17608
17628
|
return result.code;
|
|
17609
17629
|
}).catch( err => {
|
|
@@ -17926,7 +17946,7 @@ class Bundle$$1 {
|
|
|
17926
17946
|
}
|
|
17927
17947
|
|
|
17928
17948
|
this.resolveId = first(
|
|
17929
|
-
[ id => this.isExternal( id ) ? false : null ]
|
|
17949
|
+
[ ( id, parentId ) => this.isExternal( id, parentId, false ) ? false : null ]
|
|
17930
17950
|
.concat( this.plugins.map( plugin => plugin.resolveId ).filter( Boolean ) )
|
|
17931
17951
|
.concat( resolveId )
|
|
17932
17952
|
);
|
|
@@ -18276,7 +18296,7 @@ class Bundle$$1 {
|
|
|
18276
18296
|
return ( resolvedId ? Promise.resolve( resolvedId ) : this.resolveId( source, module.id ) )
|
|
18277
18297
|
.then( resolvedId => {
|
|
18278
18298
|
const externalId = resolvedId || (isRelative( source ) ? path.resolve( module.id, '..', source ) : source);
|
|
18279
|
-
let isExternal = this.isExternal( externalId );
|
|
18299
|
+
let isExternal = this.isExternal( externalId, module.id, true );
|
|
18280
18300
|
|
|
18281
18301
|
if ( !resolvedId && !isExternal ) {
|
|
18282
18302
|
if ( isRelative( source ) ) {
|
|
@@ -22616,7 +22636,7 @@ function watch$1(configs) {
|
|
|
22616
22636
|
return new Watcher(configs);
|
|
22617
22637
|
}
|
|
22618
22638
|
|
|
22619
|
-
var version$1 = "0.52.
|
|
22639
|
+
var version$1 = "0.52.3";
|
|
22620
22640
|
|
|
22621
22641
|
exports.rollup = rollup;
|
|
22622
22642
|
exports.watch = watch$1;
|