ethjs-util icon indicating copy to clipboard operation
ethjs-util copied to clipboard

Expose prebuilt package

Open harshjv opened this issue 8 years ago • 4 comments

Exposing prebuilt package so it can be used without babel in other projects. (or at least without a global transform)

harshjv avatar May 06 '17 07:05 harshjv

Coverage Status

Coverage remained the same at 100.0% when pulling ef23f8c4e2daf77a6ec6f9f53b040a456846ecae on harshjv:expose-prebuilt-package into a76d4798e18ab78aabd1bb91cef2ebe0b9f2863c on ethjs:master.

coveralls avatar May 06 '17 07:05 coveralls

You could just import the dist file like so:

const ethUtil = require('ethjs-util/dist/ethjs-util.js');

SilentCicero avatar May 08 '17 20:05 SilentCicero

Ya, but that will only work if someone writes ethjs-util/dist/ethjs-util.js instead of ethjs-util which isn't a case with many open source projects using this package.

Cheers.

harshjv avatar May 08 '17 20:05 harshjv

I can adjust the code to fix the use of module exports/global etc. I think that would be a better approach. I dont want to ship the minified or build as the main package as I already ship an ES5 build.

So your saying your having trouble using this with webpack? Where and how, could you expand? Sorry, been busy on other projects. But I think we can safe wrap module, so that is nicely exports to global if available.

I have no trouble using this module with webpack though, so I dont see where the trouble area is coming from. This module is published in ES5 common JS code, so it should work with webpack/nodejs out of the box.

It's constructued in ES6, but shipped in NPM in ES6 common JS compliance.

@harshjv

SilentCicero avatar May 12 '17 02:05 SilentCicero