//tool.js
export const a = () =>()
export const b = () =>()
//tool.js
export default {
a:()=>()
b:
c:
...
}
what"s the difference between these two when webpack compiles? When loading on demand
which do you use when writing utility functions?
what I want to ask is whether
webpack packaging on demand will separate the functions in the first one. For example, if I have a file import {a}
webpack, just take out the a function. If you use the object, it must be the whole file