gooy / js-deco

Common javascript decorators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Browserify cherry picking

sebdeckers opened this issue · comments

What is the recommended way to import these decorators using Browserify?

I'm cherry picking the chain decorator so that the others won't need to be included in my app bundle.

This works but looks odd:

import { chain } from 'js-deco/dist/commonjs/chain'

Wondering if there is a better way?

Also, what is the difference with the underscore version? E.g. _chain

FYI the syntax shown in README does not work with Browserify.

import { chain } from 'js-deco'
Error: Cannot find module 'js-deco' from '/Users/seb/GitHub/cofounders/lgtm/src/frontend'

Been a while since I used JSPM so not immediately sure where the conflict lies. Ideas?