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
/import
s 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
Post a Comment