I understand the motivation of removing the js folder. There’s any plans to create a way to create UMD (Universe Module Definition) that takes jm folder as input. In my case, I’m still using script tag in my projects.
The use of “Rollup” module can transpile files to UMD as output (.umd.cjs extension)
Thanks for your reply and the mention of moduler @Mugen87 !
This is a workaround but it could be interesting to have a way an to create build focused on examples folder (called as three.extra.* for example ) as many formats as three.js has like three.min.js, three.modules.js, three.cjs,etc
as per @MrBodean , I don’t think anyone can disagree es6 is best, though I suspect a lot of users here are not using three for large-scale applications, probably more one-offs/showcases/simplistic things. The reality is that if you do it the old way, it’s going to be a massive pain to change.
Does anyone have any good resources to educate me on what I would need to actually do to change old style into es6?
Thanks for your suggestion @makc3d . I think is the thing I will do. I agree that we have to adapt or tend code to current technologies but I have the following doubts for use ESM,
I transpile my projects as .min.js through Clouse Compiler of Google that minimizes a lot all files of my projects. In the other hand modules can be transpiled in a single file using “Rollup” and, as far as I know, it generates the “module.js” as result of concatening all file modules in a single file.
I have another doubt that I didn’t tried. If we create the transpiled “module.js” from 2 projects that it has same dependencies but diferent versions (defined in “package.json”)… Do they can coexist toghether ? If they can coexist toghether, we have also a same packages with diferent versions liveing toghether, is not optimized at all. It’s eating space and resources from my point of view.