New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make identifiers pretty instead of mangled. #8
Comments
I was thinking about this, and I´m not sure how we could do it reliably. A naive approach might transform the module ID Instead, could we just define a |
I agree. If you specify a namespace, we shouldn't have to mangle anything, we can instead directly attach: __MODULES__["Number"] = {};
__MODULES__["123_INVALID--;IDENTIFER"] = {}; |
Will we still need to procedurally generate names for anonymous modules? |
We can remove generated identifiers if we are okay with enforcing a namespace. That may be a better way of going about this anyways. |
Do we generate names for anonymous modules from the file path? |
Rather: will we generate names for anonymous modules from the file path? |
Run the
moduleName
through a function that can generate a pretty and valid JavaScript identifier. This will help avoid the need to mangle the identifier for uniqueness.The text was updated successfully, but these errors were encountered: