Way to enforce the standalone package name
If a module is named like peaks.js, where the . has a decorative value and not a namespace value, /standalone/peaks.js is equivalent to the --standalone peaks.js browserify command.
The issue is the exported module is exported as window.peaks.js, js becoming a property of the namespace peaks.
It does not seem to be doable in substack/node-browserify#818: what could be a proper way to define the standalone module name for browserify-cdn?
I would definitely map /standalone/peaks.js as --standalone peaks, to match the library examples and so on.
Thanks for your insights :-)
Probably I would just s/./_/ or similar, and then document it.
The same for modules with a - in the name.
f.e. 1-liners would become window.1-liners but this breaks before it even builds. see https://wzrd.in/standalone/[email protected]
or https://wzrd.in/standalone/2dgeometry@latest (a module starting with a number is also not valid.)
refs 1-liners/1-liners/issues/128
I think the best solution would be to add a possibility for defining the standalone-variable f.e. https://wzrd.in/standalone/oneLiners/1-liners@latest