Skip to content

Commit

Permalink
Consider actually exported names in hash, resolve #2692
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Feb 16, 2019
1 parent cf12596 commit f5b0bc3
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/Chunk.ts
Expand Up @@ -707,6 +707,7 @@ export default class Chunk {

hash.update(addons.hash);
hash.update(options.format);
hash.update(Object.keys(this.exportNames).join(','));
this.visitDependencies(dep => {
if (dep instanceof ExternalModule) hash.update(':' + dep.renderPath);
else hash.update(dep.getRenderedHash());
Expand Down
@@ -1,4 +1,4 @@
define(['./chunk-main2-36fde4aa-amd.js'], function (main2) { 'use strict';
define(['./chunk-main2-dda51113-amd.js'], function (main2) { 'use strict';

main2.log(main2.dep);

Expand Down

This file was deleted.

@@ -0,0 +1,7 @@
define(['./chunk-main2-dda51113-amd.js'], function (main2) { 'use strict';



return main2.log;

});
@@ -1,5 +1,5 @@
'use strict';

var main2 = require('./chunk-main2-72ffade3-cjs.js');
var main2 = require('./chunk-main2-9301b27d-cjs.js');

main2.log(main2.dep);

This file was deleted.

@@ -0,0 +1,7 @@
'use strict';

var main2 = require('./chunk-main2-9301b27d-cjs.js');



module.exports = main2.log;
@@ -1,3 +1,3 @@
import { a as log, b as dep } from './chunk-main2-33a8eba2-esm.js';
import { a as log, b as dep } from './chunk-main2-bee79135-esm.js';

log(dep);
@@ -0,0 +1 @@
export { a as default } from './chunk-main2-bee79135-esm.js';

This file was deleted.

@@ -1,4 +1,4 @@
System.register(['./chunk-main2-bd8b7ffb-system.js'], function (exports, module) {
System.register(['./chunk-main2-441b49d2-system.js'], function (exports, module) {
'use strict';
var log, dep;
return {
Expand Down
@@ -1,4 +1,4 @@
System.register(['./chunk-main2-bd8b7ffb-system.js'], function (exports, module) {
System.register(['./chunk-main2-441b49d2-system.js'], function (exports, module) {
'use strict';
return {
setters: [function (module) {
Expand Down
1 change: 0 additions & 1 deletion test/file-hashes/samples/respects-exports/_config.js
@@ -1,5 +1,4 @@
module.exports = {
solo: true,
description: 'creates different hashes if the content is equal but the generated exports differ',
options1: {
input: ['main1', 'other']
Expand Down
2 changes: 1 addition & 1 deletion test/misc/bundle-information.js
Expand Up @@ -26,7 +26,7 @@ describe('The bundle object', () => {
.then(({ output }) => {
assert.deepEqual(
output.map(chunk => chunk.fileName),
['input1-6792d712.js', 'input2-82fc6fc0.js', 'generated-chunk-d6db1a1e.js'],
['input1-02f7855a.js', 'input2-253c4620.js', 'generated-chunk-d6db1a1e.js'],
'fileName'
);
assert.deepEqual(
Expand Down

0 comments on commit f5b0bc3

Please sign in to comment.