3 ms·
> Feels like modularity is missing, though. Is there any support for "require" or "import" or something similar? I haven't personally tested it, but i imagine
by fizzbatter 12y ago
> Feels like modularity is missing, though. Is there any support for "require" or "import" or something similar?
I haven't personally tested it, but i imagine everything is supported, including require and import. It doesn't look like Spider does anything weird to scoping, so to use a global you simply use it with `::global(foo)`, or `use global; global(foo)`
I imagine require would be `use require; require('mylib')`, and etc.
- alongub 12y agoOf course, but I think he meant native modularity support, which is important IMO.
- fizzbatter 12y agoIsn't that a huge problem to solve though? I don't think i've seen a consistent model for this that suppots both Browser and Server(Node). Node is simple, but Browser has a lot of possible implementations, and a lot of preferences from userspace on how it should technically be implemented. Ie, i have a strong dislike for how RequireJS handles this. I much prefer simply embedding with Browserify and the like. How would you handle this issue, i wonder?