main.js
import {VERSION} from './core.js';
core.js
function makeVersion(full) {
return Object.create(Version.prototype, {
full: { value: full }
});
}
var Version = makeVersion;
export var VERSION = new Version('0.0.0');
Results in an empty file. which is correct. Now change single line like so:
var Version = (makeVersion); // add parenthesis
And now the result is:
'use strict';
function makeVersion(full) {
return Object.create(Version.prototype, {
full: { value: full }
});
}
var Version = (makeVersion);
var VERSION = new Version('0.0.0');
I would expect that adding of parenthesis should not change the result of tree shaking.
main.js
core.jsResults in an empty file. which is correct. Now change single line like so:
And now the result is:
I would expect that adding of parenthesis should not change the result of tree shaking.