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 esm build #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add esm build #241

wants to merge 1 commit into from

Conversation

rapropos
Copy link

This is a proof of concept intended to address #236. There are a few decisions remaining involving where files should be located, whether or not to still include an IIFE version, and what to do about SJIS, but I can at least report that I can build and use this with npm link, include it in an Angular 10 Ivy project, get no warnings about CommonJS, and QR codes seem to display as before in the app when deployed.

The conversion to use rollup made by @LinusU in 9e702a1 did all the real heavy lifting here.

@soldair
Copy link
Owner

soldair commented Oct 28, 2020

this looks good. I haven't had a chance to test it but when i do i'll merge it

@LinusU
Copy link
Contributor

LinusU commented Nov 4, 2020

Why not put it in the build directory with the other built files? 🤔

dist is not in the files array so not 100% sure that it will be included (maybe npm reads the module fields and includes that file anyways...)

@majies
Copy link

majies commented Mar 9, 2023

@soldair any chance of this getting merged mate?

@quantuminformation
Copy link

any news?

@soldair
Copy link
Owner

soldair commented Feb 20, 2024

Adding module to the package json may have unintended consequences it's not "the way". Where it behaves in an unexpected way depending on how old your bundler is.

https://stackoverflow.com/questions/42708484/what-is-the-module-package-json-field-for

I think that as long as this isn't a breaking change for existing users it's fine still.

When you tried it how did it work for you?

@jacobg
Copy link

jacobg commented Sep 17, 2024

What's the workaround for this on vite? Neither optimizeDeps nor commonjsOptions seem to help.

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.

6 participants