I am working on node@6.11.0, webpack@3.4.1
file.js
export function foo () {
return 'foo'
}
export function bar() {
return 'bar'
}
main.js
import { foo } from './file'
import { log } from 'mathjs'
foo()
log(10000,10)
And bundle.js include all methods from math.js, so i wonder if tree-shaking works.
and the function bar has signed with /* unused harmony export bar */
when i use tree-shaking, the bundlejs should be only include foo and lod methods, shouldn't it?
git clone https://github.com/z2014/All-test-demo
,and test