Closed mAAdhaTTah closed 6 years ago
Good point @mAAdhaTTah I'll look into that asap
hey @mAAdhaTTah do you have an idea/example how that may be set up in the package.json file so that two versions of library are delivered ?
Offhand, this might be a useful example, from the framework I'm working on: https://github.com/valtech-nyc/brookjs/tree/master/packages/brookjs It's in a monorepo overall, but that should give you an idea of how I distribute cjs
, esm
, as well as a browser-friendly dist
(although that last one I'm less sure is ideal).
hey @mAAdhaTTah CJS should be available ion a current version as well
with following syntax
var VueMasonryPlugin = require('vue-masonry').VueMasonryPlugin
let me know if that helped
Browserify is choking on this because it can't yet handle ESM. The
src
appears to be mostly ES5 code except for the import statements; pointing it at thedist
grabs the version that comes with Vue bundled, so unfortunately, neither of versions currently available on npm can be consumed by browserify. Could you distribute a CJS version as well?