ApeironTsuka / node-webpmux

A mostly 1:1 re-implementation of webpmux as a Node module in pure Javascript. Only thing currently missing is a command-line version.
GNU Lesser General Public License v3.0
26 stars 8 forks source link

Hey! Can you please turn this into a CommonJS module? #3

Closed PurpShell closed 3 years ago

PurpShell commented 3 years ago

Hello! I am searching for a lightweight alternative to webpmux since it took 31 megabytes on my system, just to parse two texts.. So I stumbled upon this, and i asked my friend to test it, but he had issues with updating to node 14.. Can you make it a commonjs module, or at least a branch for commonjs?

PurpShell commented 3 years ago

you can also make it node-webpmux-commonjs on npm for the commonjs module

PurpShell commented 3 years ago

I can help you if you want, and there will be a lot of people using this.

PurpShell commented 3 years ago

I already made a pr and made a package node-webpmux-commonjs

ApeironTsuka commented 3 years ago

You should be able to use ESM from as far back as Node v8.5.0, though I think it was locked behind the --experimental-modules flag until Node v14. If using this flag isn't an option, I'll swap over to CommonJS. Maybe with a .mjs wrapper.

The next major update (v2.0.0, finishing up on it) is going to have an optional WebAssembly module, which should be supported from Node v8 as well, if I recall correctly.

Edit: On second thought, I've converted the next version over to CommonJS. I'll probably push it in the next day or two pending some more testing.

PurpShell commented 3 years ago

hey! i already made a pr, with nicer docs

PurpShell commented 3 years ago

using --experimental-modules is sadly not an option

PurpShell commented 3 years ago

because it will be referenced from another package

ApeironTsuka commented 3 years ago

XD Seems you had the same idea with the docs. Already have a Markdown version ready with the pending update, sorry about that. I'll push the whole thing in a bit after reading through the changes in the PR, as I think I've tested everything. The formatting is going to be different (as I did this a few days ago) but I'll update some of the layout and wording from the PR in places.

ApeironTsuka commented 3 years ago

Pushed the big update. Everything I've tested has worked, but publishing to NPM can wait a day or two in case there's any issues.