cljsjs

pez 2017-01-21T16:14:47.000662Z

Hello. I’m trying to package react-equalizer, but run into problems when using the packaged results. The console give me exports is not defined. It happens right at the beginning of react-equalizer.inc.js:

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

pez 2017-01-21T16:16:22.000663Z

I’m a total beginner at this. No pointers could be too basic. 😃

2017-01-21T17:39:59.000665Z

@pez this library is not intended to be consumed by the browser directly, it assumes you're using some kinda code bundler / transcompiler compatible with CommonJS

pez 2017-01-21T17:41:00.000666Z

I see some packages use webpack. Is that a bundler?

2017-01-21T17:41:15.000667Z

yes, that's one of the popular ones

pez 2017-01-21T17:41:59.000668Z

Thanks! I’ll give it a try.

2017-01-21T17:42:57.000669Z

I'm afraid you'll either have to apply a patch to strip the CommonJS layer or ask the author nicely to support direct browser consumption to package it into CLJSJS

2017-01-21T17:43:00.000670Z

good luck~

pez 2017-01-21T17:44:01.000671Z

I’ll need it. 😃

2017-01-21T17:50:54.000672Z

this is one of the biggest problems I've had using cljs... we use a different module management system than the rest of the JS community and they are not compatible.