@@ -34,9 +34,9 @@ export default {
34
34
input: ' src/index.js' ,
35
35
output: {
36
36
dir: ' output' ,
37
- format: ' cjs' ,
37
+ format: ' cjs'
38
38
},
39
- plugins: [commonjs ()],
39
+ plugins: [commonjs ()]
40
40
};
41
41
```
42
42
@@ -66,8 +66,8 @@ commonjs({
66
66
' !node_modules/logform/index.js' ,
67
67
' !node_modules/logform/format.js' ,
68
68
' !node_modules/logform/levels.js' ,
69
- ' !node_modules/logform/browser.js' ,
70
- ],
69
+ ' !node_modules/logform/browser.js'
70
+ ]
71
71
});
72
72
```
73
73
@@ -250,7 +250,7 @@ This is in line with how other bundlers handle this situation and is also the mo
250
250
251
251
var dep$1 = /* #__PURE__*/ Object .freeze ({
252
252
__proto__: null ,
253
- default: dep,
253
+ default: dep
254
254
});
255
255
256
256
console .log (dep$1 .default );
@@ -281,7 +281,7 @@ For these situations, you can change Rollup's behaviour either globally or per m
281
281
enumerable: true ,
282
282
get : function () {
283
283
return n[k];
284
- },
284
+ }
285
285
}
286
286
);
287
287
});
@@ -309,7 +309,9 @@ For these situations, you can change Rollup's behaviour either globally or per m
309
309
import * as dep$1 from ' dep' ;
310
310
311
311
function getDefaultExportFromNamespaceIfNotNamed (n ) {
312
- return n && Object .prototype .hasOwnProperty .call (n, ' default' ) && Object .keys (n).length === 1 ? n[' default' ] : n;
312
+ return n && Object .prototype .hasOwnProperty .call (n, ' default' ) && Object .keys (n).length === 1
313
+ ? n[' default' ]
314
+ : n;
313
315
}
314
316
315
317
var dep = getDefaultExportFromNamespaceIfNotNamed (dep$1);
@@ -357,9 +359,9 @@ export default {
357
359
output: {
358
360
file: ' bundle.js' ,
359
361
format: ' iife' ,
360
- name: ' MyModule' ,
362
+ name: ' MyModule'
361
363
},
362
- plugins: [resolve (), commonjs ()],
364
+ plugins: [resolve (), commonjs ()]
363
365
};
364
366
```
365
367
@@ -369,7 +371,7 @@ Symlinks are common in monorepos and are also created by the `npm link` command.
369
371
370
372
``` js
371
373
commonjs ({
372
- include: / node_modules/ ,
374
+ include: / node_modules/
373
375
});
374
376
```
375
377
@@ -392,11 +394,11 @@ function cjsDetectionPlugin() {
392
394
moduleParsed ({
393
395
id,
394
396
meta: {
395
- commonjs: { isCommonJS },
396
- },
397
+ commonjs: { isCommonJS }
398
+ }
397
399
}) {
398
400
console .log (` File ${ id} is CommonJS: ${ isCommonJS} ` );
399
- },
401
+ }
400
402
};
401
403
}
402
404
```
0 commit comments