rollup 0.41.2 → 0.41.6
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 +21 -0
- package/README.md +47 -82
- package/bin/rollup +3 -3
- package/dist/rollup.browser.js +47 -22
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.es.js +47 -22
- package/dist/rollup.es.js.map +1 -1
- package/dist/rollup.js +47 -22
- package/dist/rollup.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# rollup changelog
|
|
2
2
|
|
|
3
|
+
## 0.41.6
|
|
4
|
+
|
|
5
|
+
* Preserve `originalSourceMap` on incremental rebuilds for loaders with sourcemaps ([#1336](https://github.com/rollup/rollup/issues/1336))
|
|
6
|
+
|
|
7
|
+
## 0.41.5
|
|
8
|
+
|
|
9
|
+
* Wrap ternary consequent/alternate sequences in parens ([#1273](https://github.com/rollup/rollup/issues/1273))
|
|
10
|
+
* Fix erroneous warning on multiple `export * from` declarations with defaults ([#1278](https://github.com/rollup/rollup/issues/1278))
|
|
11
|
+
* Prevent variable conflicts with `treeshake: false` ([#1268](https://github.com/rollup/rollup/issues/1268))
|
|
12
|
+
* Allow missing `source` when collapsing sourcemaps ([#1254](https://github.com/rollup/rollup/issues/1254))
|
|
13
|
+
* Allow plugins to log with strings ([#1316](https://github.com/rollup/rollup/pull/1316))
|
|
14
|
+
|
|
15
|
+
## 0.41.4
|
|
16
|
+
|
|
17
|
+
* Fix cases of multiple `export * from 'external'` declarations ([#1252](https://github.com/rollup/rollup/issues/1252))
|
|
18
|
+
* Fix 'TODO' error message ([#1257](https://github.com/rollup/rollup/issues/1257))
|
|
19
|
+
|
|
20
|
+
## 0.41.3
|
|
21
|
+
|
|
22
|
+
* Don't treat `this.foo` as possible namespace ([#1258](https://github.com/rollup/rollup/issues/1258))
|
|
23
|
+
|
|
3
24
|
## 0.41.2
|
|
4
25
|
|
|
5
26
|
* Optimize `namespace['foo']` references ([#1240](https://github.com/rollup/rollup/pull/1240))
|
package/README.md
CHANGED
|
@@ -26,123 +26,88 @@
|
|
|
26
26
|
</a>
|
|
27
27
|
</p>
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
>
|
|
31
|
-
> *I roll up, I roll up, I roll up*
|
|
32
|
-
> –[Wiz Khalifa](https://www.youtube.com/watch?v=UhQz-0QVmQ0)
|
|
29
|
+
## Overview
|
|
33
30
|
|
|
31
|
+
Rollup is a module bundler for JavaScript which compiles small pieces of code into a something larger and more complex, such as a library or application. It uses the new standardized format for code modules included in the ES6 revision of JavaScript, instead of previous idiosyncratic solutions such as CommonJS and AMD.
|
|
34
32
|
|
|
35
|
-
##
|
|
33
|
+
## Quick Start Guide
|
|
36
34
|
|
|
37
|
-
Rollup can be used
|
|
35
|
+
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://github.com/rollup/rollup/wiki/Command-Line-Interface) with an optional configuration file, or else through its [JavaScript API](https://github.com/rollup/rollup/wiki/JavaScript-API). Run `rollup --help` to see the available options and parameters. The [starter project template](https://github.com/rollup/rollup-starter-project) demonstrates common configuration options, and more detailed instructions are available throughout the [user guide](http://rollupjs.org/guide/).
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
### Commands
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.
|
|
42
40
|
|
|
41
|
+
For browsers:
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
The solution is to write your code as **modules**, and use a **module bundler** to concatenate everything into a single file. [Browserify](http://browserify.org/) and [Webpack](http://webpack.github.io/) are examples of module bundlers.
|
|
49
|
-
|
|
50
|
-
So far, so good, **but there's a problem**. When you include a library in your bundle...
|
|
51
|
-
|
|
52
|
-
```js
|
|
53
|
-
var utils = require( 'utils' );
|
|
54
|
-
|
|
55
|
-
var query = 'Rollup';
|
|
56
|
-
utils.ajax( 'https://api.example.com?search=' + query ).then( handleResponse );
|
|
43
|
+
```bash
|
|
44
|
+
# compile to a <script> containing a self-executing function
|
|
45
|
+
$ rollup main.js --format iife --output bundle.js
|
|
57
46
|
```
|
|
58
47
|
|
|
59
|
-
|
|
48
|
+
For Node.js:
|
|
60
49
|
|
|
61
|
-
|
|
50
|
+
```bash
|
|
51
|
+
# compile to a CommonJS module
|
|
52
|
+
$ rollup main.js --format cjs --output bundle.js
|
|
53
|
+
```
|
|
62
54
|
|
|
63
|
-
|
|
64
|
-
import { ajax } from 'utils';
|
|
55
|
+
For both browsers and Node.js:
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
```bash
|
|
58
|
+
# UMD format requires a bundle name
|
|
59
|
+
$ rollup main.js --format umd --name "myBundle" --output bundle.js
|
|
68
60
|
```
|
|
69
61
|
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
## Why
|
|
72
63
|
|
|
73
|
-
|
|
64
|
+
Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language.
|
|
74
65
|
|
|
75
|
-
|
|
66
|
+
This finally changed with the ES6 revision of JavaScript, which includes a syntax for importing and exporting functions and data so they can be shared between separate scripts. The specification is now fixed, but it is not yet implemented in browsers or Node.js. Rollup allows you to write your code using the new module system, and will then compile it back down to existing supported formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to *write future-proof code*, and you also get the tremendous benefits of...
|
|
76
67
|
|
|
68
|
+
## Tree Shaking
|
|
77
69
|
|
|
78
|
-
|
|
70
|
+
In addition to enabling the use of ES6 modules, Rollup also statically analyzes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.
|
|
79
71
|
|
|
80
|
-
|
|
72
|
+
For example, with CommonJS, the *entire tool or library must be imported*.
|
|
81
73
|
|
|
82
74
|
```js
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
function bar () {
|
|
89
|
-
console.log( 'this function was not' );
|
|
90
|
-
baz();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function baz () {
|
|
94
|
-
console.log( 'neither was this' );
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
foo();
|
|
98
|
-
})();
|
|
75
|
+
// import the entire utils object with CommonJS
|
|
76
|
+
var utils = require( 'utils' );
|
|
77
|
+
var query = 'Rollup';
|
|
78
|
+
// use the ajax method of the utils object
|
|
79
|
+
utils.ajax( 'https://api.example.com?search=' + query ).then( handleResponse );
|
|
99
80
|
```
|
|
100
81
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
But because of the limitations of static analysis, and the dynamic nature of JavaScript, it can't do the same thing with code like this:
|
|
82
|
+
But with ES6 modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need:
|
|
104
83
|
|
|
105
84
|
```js
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
bar: function () {
|
|
113
|
-
console.log( 'so was this :-(' );
|
|
114
|
-
this.baz();
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
baz: function () {
|
|
118
|
-
console.log( 'and this :-(' );
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
obj.foo();
|
|
123
|
-
})();
|
|
85
|
+
// import the ajax function with an ES6 import statement
|
|
86
|
+
import { ajax } from 'utils';
|
|
87
|
+
var query = 'Rollup';
|
|
88
|
+
// call the ajax function
|
|
89
|
+
ajax( 'https://api.example.com?search=' + query ).then( handleResponse );
|
|
124
90
|
```
|
|
125
91
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
## Can I use it with my non-ES6 dependencies?
|
|
130
|
-
|
|
131
|
-
[Yes!](https://github.com/rollup/rollup/wiki/Bundling-CommonJS-modules) Rollup can't work its tree-shaking magic on CommonJS modules, but it can convert them to ES6 via [plugins](https://github.com/rollup/rollup/wiki/Plugins).
|
|
92
|
+
Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit `import` and `export` statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.
|
|
132
93
|
|
|
94
|
+
ES6 modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries, without weighing down your project with all the other unused code. This will eventually be possible natively, but Rollup lets you do it today.
|
|
133
95
|
|
|
134
|
-
##
|
|
96
|
+
## Compatibility
|
|
135
97
|
|
|
136
|
-
|
|
98
|
+
### Importing CommonJS
|
|
137
99
|
|
|
138
|
-
|
|
100
|
+
Rollup can import existing CommonJS modules [through a plugin](https://github.com/rollup/rollup-plugin-commonjs).
|
|
139
101
|
|
|
102
|
+
### Publishing ES6 Modules
|
|
140
103
|
|
|
141
|
-
|
|
104
|
+
To make sure your ES6 modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES6-aware tools like Rollup and [webpack 2](https://webpack.js.org/) will [import the ES6 module version](https://github.com/rollup/rollup/wiki/pkg.module) directly.
|
|
142
105
|
|
|
143
|
-
|
|
106
|
+
## Links
|
|
144
107
|
|
|
108
|
+
- step-by-step [tutorial video series](https://code.lengstorf.com/learn-rollup-js/), with accompanying written walkthrough
|
|
109
|
+
- miscellaneous issues in the [wiki](https://github.com/rollup/rollup/wiki)
|
|
145
110
|
|
|
146
111
|
## License
|
|
147
112
|
|
|
148
|
-
|
|
113
|
+
[MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
|
package/bin/rollup
CHANGED
|
@@ -247,7 +247,7 @@ function isNumber (x) {
|
|
|
247
247
|
|
|
248
248
|
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 <output> Output (if absent, prints to stdout)\n-f, --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-u, --id ID for AMD module (default is anonymous)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\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--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\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://github.com/rollup/rollup/wiki\n";
|
|
249
249
|
|
|
250
|
-
var version = "0.41.
|
|
250
|
+
var version = "0.41.6";
|
|
251
251
|
|
|
252
252
|
var path$1 = path__default;
|
|
253
253
|
var Module = module$1;
|
|
@@ -362,7 +362,7 @@ Object.defineProperty(module, 'exports', {
|
|
|
362
362
|
});
|
|
363
363
|
|
|
364
364
|
var index$10 = function () {
|
|
365
|
-
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-
|
|
365
|
+
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
|
|
366
366
|
};
|
|
367
367
|
|
|
368
368
|
var ansiRegex = index$10();
|
|
@@ -566,7 +566,7 @@ var errorSymbol = process.stderr.isTTY ? "🚨 " : "Error: ";
|
|
|
566
566
|
var stderr = console.error.bind( console ); // eslint-disable-line no-console
|
|
567
567
|
|
|
568
568
|
function log ( object, symbol ) {
|
|
569
|
-
var message = object.plugin ? ("(" + (object.plugin) + " plugin) " + (object.message)) : object.message;
|
|
569
|
+
var message = (object.plugin ? ("(" + (object.plugin) + " plugin) " + (object.message)) : object.message) || object;
|
|
570
570
|
|
|
571
571
|
stderr( ("" + symbol + (index$3.bold( message ))) );
|
|
572
572
|
|
package/dist/rollup.browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rollup.js v0.41.
|
|
3
|
-
|
|
2
|
+
Rollup.js v0.41.6
|
|
3
|
+
Thu Mar 16 2017 00:50:36 GMT-0400 (EDT) - commit a96a923d631b9d2c471137542b9c4f578b8faa53
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
@@ -6047,12 +6047,14 @@ function callHasEffects ( scope, callee, isNew ) {
|
|
|
6047
6047
|
}
|
|
6048
6048
|
}
|
|
6049
6049
|
|
|
6050
|
-
else {
|
|
6051
|
-
if ( !node.gatherPossibleValues ) {
|
|
6052
|
-
throw new Error( 'TODO' );
|
|
6053
|
-
}
|
|
6050
|
+
else if ( node.gatherPossibleValues ) {
|
|
6054
6051
|
node.gatherPossibleValues( values );
|
|
6055
6052
|
}
|
|
6053
|
+
|
|
6054
|
+
else {
|
|
6055
|
+
// probably an error in the user's code — err on side of caution
|
|
6056
|
+
return true;
|
|
6057
|
+
}
|
|
6056
6058
|
}
|
|
6057
6059
|
|
|
6058
6060
|
return false;
|
|
@@ -6263,10 +6265,18 @@ var ConditionalExpression = (function (Node) {
|
|
|
6263
6265
|
else if ( this.testValue ) {
|
|
6264
6266
|
code.remove( this.start, this.consequent.start );
|
|
6265
6267
|
code.remove( this.consequent.end, this.end );
|
|
6268
|
+
if ( this.consequent.type === 'SequenceExpression' ) {
|
|
6269
|
+
code.insertRight( this.consequent.start, '(' );
|
|
6270
|
+
code.insertLeft( this.consequent.end, ')' );
|
|
6271
|
+
}
|
|
6266
6272
|
this.consequent.render( code, es );
|
|
6267
6273
|
} else {
|
|
6268
6274
|
code.remove( this.start, this.alternate.start );
|
|
6269
6275
|
code.remove( this.alternate.end, this.end );
|
|
6276
|
+
if ( this.alternate.type === 'SequenceExpression' ) {
|
|
6277
|
+
code.insertRight( this.alternate.start, '(' );
|
|
6278
|
+
code.insertLeft( this.alternate.end, ')' );
|
|
6279
|
+
}
|
|
6270
6280
|
this.alternate.render( code, es );
|
|
6271
6281
|
}
|
|
6272
6282
|
}
|
|
@@ -6436,6 +6446,8 @@ var ExportDefaultDeclaration = (function (Node) {
|
|
|
6436
6446
|
var hasEffects = this.declaration.hasEffects( this.module.scope );
|
|
6437
6447
|
code.remove( this.start, hasEffects ? declaration_start : this.next || this.end );
|
|
6438
6448
|
}
|
|
6449
|
+
} else if (name === this.declaration.name) {
|
|
6450
|
+
code.remove( this.start, this.next || this.end );
|
|
6439
6451
|
} else {
|
|
6440
6452
|
code.overwrite( this.start, declaration_start, ((this.module.bundle.varOrConst) + " " + name + " = ") );
|
|
6441
6453
|
}
|
|
@@ -7060,7 +7072,7 @@ var MemberExpression = (function (Node) {
|
|
|
7060
7072
|
// TODO this code is a bit inefficient
|
|
7061
7073
|
var keypath = new Keypath( this );
|
|
7062
7074
|
|
|
7063
|
-
if ( !keypath.computed ) {
|
|
7075
|
+
if ( !keypath.computed && keypath.root.type === 'Identifier' ) {
|
|
7064
7076
|
var declaration = scope.findDeclaration( keypath.root.name );
|
|
7065
7077
|
|
|
7066
7078
|
while ( declaration.isNamespace && keypath.parts.length ) {
|
|
@@ -8119,6 +8131,7 @@ Module.prototype.toJSON = function toJSON () {
|
|
|
8119
8131
|
dependencies: this.dependencies.map( function (module) { return module.id; } ),
|
|
8120
8132
|
code: this.code,
|
|
8121
8133
|
originalCode: this.originalCode,
|
|
8134
|
+
originalSourceMap: this.originalSourceMap,
|
|
8122
8135
|
ast: this.astClone,
|
|
8123
8136
|
sourceMapChain: this.sourceMapChain,
|
|
8124
8137
|
resolvedIds: this.resolvedIds
|
|
@@ -8132,8 +8145,8 @@ Module.prototype.trace = function trace ( name ) {
|
|
|
8132
8145
|
}
|
|
8133
8146
|
|
|
8134
8147
|
if ( name in this.imports ) {
|
|
8135
|
-
|
|
8136
|
-
|
|
8148
|
+
var importDeclaration = this.imports[ name ];
|
|
8149
|
+
var otherModule = importDeclaration.module;
|
|
8137
8150
|
|
|
8138
8151
|
if ( importDeclaration.name === '*' && !otherModule.isExternal ) {
|
|
8139
8152
|
return otherModule.namespace();
|
|
@@ -8158,6 +8171,12 @@ Module.prototype.trace = function trace ( name ) {
|
|
|
8158
8171
|
Module.prototype.traceExport = function traceExport ( name ) {
|
|
8159
8172
|
var this$1 = this;
|
|
8160
8173
|
|
|
8174
|
+
// export * from 'external'
|
|
8175
|
+
if ( name[0] === '*' ) {
|
|
8176
|
+
var module = this.bundle.moduleById.get( name.slice( 1 ) );
|
|
8177
|
+
return module.traceExport( '*' );
|
|
8178
|
+
}
|
|
8179
|
+
|
|
8161
8180
|
// export { foo } from './other.js'
|
|
8162
8181
|
var reexportDeclaration = this.reexports[ name ];
|
|
8163
8182
|
if ( reexportDeclaration ) {
|
|
@@ -8185,8 +8204,8 @@ Module.prototype.traceExport = function traceExport ( name ) {
|
|
|
8185
8204
|
if ( name === 'default' ) return;
|
|
8186
8205
|
|
|
8187
8206
|
for ( var i = 0; i < this.exportAllModules.length; i += 1 ) {
|
|
8188
|
-
var module = this$1.exportAllModules[i];
|
|
8189
|
-
var declaration$2 = module.traceExport( name );
|
|
8207
|
+
var module$1 = this$1.exportAllModules[i];
|
|
8208
|
+
var declaration$2 = module$1.traceExport( name );
|
|
8190
8209
|
|
|
8191
8210
|
if ( declaration$2 ) return declaration$2;
|
|
8192
8211
|
}
|
|
@@ -9039,6 +9058,9 @@ Link.prototype.traceMappings = function traceMappings () {
|
|
|
9039
9058
|
|
|
9040
9059
|
line.forEach( function (segment) {
|
|
9041
9060
|
var source = this$1.sources[ segment[1] ];
|
|
9061
|
+
|
|
9062
|
+
if ( !source ) return;
|
|
9063
|
+
|
|
9042
9064
|
var traced = source.traceSegment( segment[2], segment[3], this$1.names[ segment[4] ] );
|
|
9043
9065
|
|
|
9044
9066
|
if ( traced ) {
|
|
@@ -9538,7 +9560,9 @@ Bundle$$1.prototype.fetchModule = function fetchModule ( id, importer ) {
|
|
|
9538
9560
|
|
|
9539
9561
|
return this$1.fetchAllDependencies( module ).then( function () {
|
|
9540
9562
|
keys( module.exports ).forEach( function (name) {
|
|
9541
|
-
|
|
9563
|
+
if ( name !== 'default' ) {
|
|
9564
|
+
module.exportsAll[name] = module.id;
|
|
9565
|
+
}
|
|
9542
9566
|
});
|
|
9543
9567
|
module.exportAllSources.forEach( function (source) {
|
|
9544
9568
|
var id = module.resolvedIds[ source ];
|
|
@@ -9549,10 +9573,11 @@ Bundle$$1.prototype.fetchModule = function fetchModule ( id, importer ) {
|
|
|
9549
9573
|
if ( name in module.exportsAll ) {
|
|
9550
9574
|
this$1.warn({
|
|
9551
9575
|
code: 'NAMESPACE_CONFLICT',
|
|
9552
|
-
message: ("Conflicting namespaces: " + (relativeId( module.id )) + " re-exports '" + name + "' from both " + (relativeId( module.exportsAll[ name ] )) + "
|
|
9576
|
+
message: ("Conflicting namespaces: " + (relativeId( module.id )) + " re-exports '" + name + "' from both " + (relativeId( module.exportsAll[ name ] )) + " and " + (relativeId( exportAllModule.exportsAll[ name ] )) + " (will be ignored)")
|
|
9553
9577
|
});
|
|
9578
|
+
} else {
|
|
9579
|
+
module.exportsAll[ name ] = exportAllModule.exportsAll[ name ];
|
|
9554
9580
|
}
|
|
9555
|
-
module.exportsAll[ name ] = exportAllModule.exportsAll[ name ];
|
|
9556
9581
|
});
|
|
9557
9582
|
});
|
|
9558
9583
|
return module;
|
|
@@ -9689,7 +9714,7 @@ Bundle$$1.prototype.render = function render ( options ) {
|
|
|
9689
9714
|
.filter( Boolean )
|
|
9690
9715
|
.join( '\n\n' );
|
|
9691
9716
|
|
|
9692
|
-
|
|
9717
|
+
if ( intro ) intro += '\n\n';
|
|
9693
9718
|
|
|
9694
9719
|
var outro = [ options.outro ]
|
|
9695
9720
|
.concat(
|
|
@@ -9700,12 +9725,12 @@ Bundle$$1.prototype.render = function render ( options ) {
|
|
|
9700
9725
|
|
|
9701
9726
|
if ( outro ) outro = "\n\n" + outro;
|
|
9702
9727
|
|
|
9703
|
-
|
|
9728
|
+
var indentString = getIndentString( magicString, options );
|
|
9704
9729
|
|
|
9705
|
-
|
|
9730
|
+
var finalise = finalisers[ options.format ];
|
|
9706
9731
|
if ( !finalise ) {
|
|
9707
|
-
|
|
9708
|
-
|
|
9732
|
+
error({
|
|
9733
|
+
code: 'INVALID_OPTION',
|
|
9709
9734
|
message: ("You must specify an output type - valid options are " + (keys( finalisers ).join( ', ' )))
|
|
9710
9735
|
});
|
|
9711
9736
|
}
|
|
@@ -9816,7 +9841,7 @@ Bundle$$1.prototype.sort = function sort () {
|
|
|
9816
9841
|
var b = ordered[i];
|
|
9817
9842
|
|
|
9818
9843
|
// TODO reinstate this! it no longer works
|
|
9819
|
-
|
|
9844
|
+
if ( stronglyDependsOn[ a.id ][ b.id ] ) {
|
|
9820
9845
|
// somewhere, there is a module that imports b before a. Because
|
|
9821
9846
|
// b imports a, a is placed before b. We need to find the module
|
|
9822
9847
|
// in question, so we can provide a useful error message
|
|
@@ -9837,7 +9862,7 @@ Bundle$$1.prototype.sort = function sort () {
|
|
|
9837
9862
|
|
|
9838
9863
|
findParent( this$1.entryModule );
|
|
9839
9864
|
|
|
9840
|
-
|
|
9865
|
+
this$1.onwarn(
|
|
9841
9866
|
("Module " + (a.id) + " may be unable to evaluate without " + (b.id) + ", but is included first due to a cyclical dependency. Consider swapping the import statements in " + parent + " to ensure correct ordering")
|
|
9842
9867
|
);
|
|
9843
9868
|
}
|
|
@@ -9864,7 +9889,7 @@ Bundle$$1.prototype.warn = function warn ( warning ) {
|
|
|
9864
9889
|
this.onwarn( warning );
|
|
9865
9890
|
};
|
|
9866
9891
|
|
|
9867
|
-
var VERSION = '0.41.
|
|
9892
|
+
var VERSION = '0.41.6';
|
|
9868
9893
|
|
|
9869
9894
|
var ALLOWED_KEYS = [
|
|
9870
9895
|
'acorn',
|