Skip to content
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

add es module of gltf/library.js #567

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add es module of gltf/library.js #567

wants to merge 4 commits into from

Conversation

1d10t
Copy link
Contributor

@1d10t 1d10t commented Jun 15, 2023

usage: import * as gltfpack from 'path/to/module.js'

@zeux
Copy link
Owner

zeux commented Oct 7, 2023

I forgot to comment on this, but this is a little stuck due to node.js only having ES module support in recent versions. I'm not sure if there's a way to refactor this code so that we can have a module that can be imported but still have most of the code in the same file... and I don't think I want to maintain the duplicate JS files here.

Maybe an alternative is to have some simple prepublish step that builds the module.js file from library.js before creating the package, as long as this doesn't introduce new build time dependencies (aka runs in pure node).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants