Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Jul 11, 2022
1 parent 54c4675 commit 1791791
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 0 deletions.
@@ -0,0 +1,18 @@
const path = require('path');

module.exports = {
description: 'Supports chunk names from config when preserving modules',
options: {
input: { 'main-entry': 'main.js' },
output: {
preserveModules: true
},
plugins: [
{
buildStart() {
this.emitFile({ type: 'chunk', id: path.join(__dirname, 'b.js'), name: 'emitted' });
}
}
]
}
};
@@ -0,0 +1,5 @@
define((function () { 'use strict';

console.log('a');

}));
@@ -0,0 +1,5 @@
define((function () { 'use strict';

console.log('b');

}));
@@ -0,0 +1,5 @@
define(['./a'], (function (a) { 'use strict';

console.log('main');

}));
@@ -0,0 +1,3 @@
'use strict';

console.log('a');
@@ -0,0 +1,3 @@
'use strict';

console.log('b');
@@ -0,0 +1,5 @@
'use strict';

require('./a.js');

console.log('main');
@@ -0,0 +1 @@
console.log('a');
@@ -0,0 +1 @@
console.log('b');
@@ -0,0 +1,3 @@
import './a.js';

console.log('main');
@@ -0,0 +1,10 @@
System.register([], (function () {
'use strict';
return {
execute: (function () {

console.log('a');

})
};
}));
@@ -0,0 +1,10 @@
System.register([], (function () {
'use strict';
return {
execute: (function () {

console.log('b');

})
};
}));
@@ -0,0 +1,11 @@
System.register(['./a.js'], (function () {
'use strict';
return {
setters: [function () {}],
execute: (function () {

console.log('main');

})
};
}));
@@ -0,0 +1 @@
console.log('a');
@@ -0,0 +1 @@
console.log('b');
@@ -0,0 +1,2 @@
import './a.js';
console.log('main');

0 comments on commit 1791791

Please sign in to comment.