javascript - .min or src as "main"-file in package.json for node_module -


i'm writing library browser (js, css) dependency-free until now. have @ least 1 dependency , i'm thinking wether or not include deps build or not.

let's user uses cdn - of course minified file of library should include dependency. module bundlers webpack? if require/imports lib, should package.json point src entry or minified file? wouldn't module bundler install , include dependency anyway, minified file duplicate code (of dependency)?

what's best practice this?

namely, build leaflet plugin depend on modules of turfjs. leaflet peerdependency whereas turf dependency.


Comments

Popular posts from this blog

c++ - CPP, 'X' button listener -

shared memory - gstreamer shmsrc and shmsink with h264 data -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -