ES modules: A cartoon deep-dive
11–20 of 30 posts
Re: ES modules: A cartoon deep-dive
#12Re: ES modules: A cartoon deep-dive
#13Re: ES modules: A cartoon deep-dive
#14import {thing} from '../../../thing/in/dir.js'
and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from.
I think babel has something like this using @, but I don't use babel right now.
Re: ES modules: A cartoon deep-dive
#15The problem I find with the current ES modules is a lot of statements like this import {thing} from '../../../thing/in/dir.js' and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from. I think babel has something like this using @, but I don't use babel right now.
Re: ES modules: A cartoon deep-dive
#16The problem I find with the current ES modules is a lot of statements like this import {thing} from '../../../thing/in/dir.js' and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from. I think babel has something like this using @, but I don't use babel right now.
Re: ES modules: A cartoon deep-dive
#17The problem I find with the current ES modules is a lot of statements like this import {thing} from '../../../thing/in/dir.js' and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from. I think babel has something like this using @, but I don't use babel right now.
Re: ES modules: A cartoon deep-dive
#18The problem I find with the current ES modules is a lot of statements like this import {thing} from '../../../thing/in/dir.js' and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from. I think babel has something like this using @, but I don't use babel right now.
Re: ES modules: A cartoon deep-dive
#19The problem I find with the current ES modules is a lot of statements like this import {thing} from '../../../thing/in/dir.js' and then if I move a file I have to change all of its imports to a different number of parent traversals. It would be really nice to be able to define a path that all imports would be relative from. I think babel has something like this using @, but I don't use babel right now.
Moving files around is not something you do all that often. Doing so will present a problem in most any programming language.
Re: ES modules: A cartoon deep-dive
#20I can't wait for ES module support in Firefox by default (so all major browsers are covered). It feels so good to be able to write code in "plain old JavaScript" again without the need for transpilers and build tools for small apps. I made this minecraft WebGL2 thing ( https://mrspeaker.github.io/webgl2-voxels/ ) all in modules, and being able to just view-source without any shenanigans feels like the old days. The o…