Skip to content

Conversation

@Jordan-Lane
Copy link
Contributor

This PR adds support to export the library in both UMD and ESM format.

Now the build system exports UMD format (index.cjs), ESM format (index.mjs), and types at the root level. Exporting types at the root build level allows IDEs such as VSCode to find the typings when three-loader is used as a git submodule.

@Jordan-Lane
Copy link
Contributor Author

I originally closed as I thought I encountered an issue with the UMD build, however it was due to another local change. Reopening this as I think it is still a good starting point.

I am using Vite for my build system, so I have been able to verify the ESM build, however have had some difficulty verifying that the existing UMD build works as expected. Would someone from pnext be able to verify the UMD build works with their existing system?

If not, I can dig into the UMD build more, however might be easier verifying with pnext's original systems.

@Jordan-Lane Jordan-Lane reopened this Dec 19, 2024
@Jordan-Lane
Copy link
Contributor Author

Related issues: #15 and #67

@pjurczynski
Copy link
Collaborator

We've run prettier recently. It's highly recommended to first run "npm run format:write", commit and rebase.

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.

3 participants