As I understand, externals property is to not include the dependency in the final bundle. Am I right?
here is what I do: (i am writing a library).
this is put in webpack's config.
externals: {
JQuery: "jquery"
},
and this is my main.js which is also the entry.
import JQuery from 'jquery'
What really happens is in the final bundle (main.bundle.js) , there're 150 occurencies of jquery. Then I remove the externals completely from the webpack config and bundle it again and in main.bundle.js, occurence of jquery is still 150. It doesn't make sense. In the first case, there shouldn't be any occurence (only require) which would run in the client's code (whoever uses my library). Am i missing something?