mathiasbynens / mathiasbynens/punycode.js
Using punycode.js as a named module does not work.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Having previously configured the paths for require.js, whenever I am trying to use punycode as a named module, it does not seem to be available, until I use
``` js
require(['punycode'],function(punycode){
console.log(punycode);
});
```
The example above works, compared to the one below, that does not
Otherwise, if I am doing something like
``` js
define(['./js/libs/punycode'], function(punycode){
console.log(punycode);
});
```
then it does NOT work.
Cheers,
Alex.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the difference between loading `punycode` through `require(['punycode'], ...)` and loading `./js/libs/punycode` through `define(...)`. Inspect the package's AMD/module entry point and how the configured RequireJS paths resolve each name. Done means the named-module form loads consistently, with a regression test covering the failing example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100