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

Remove peer deps, allow use of 'import' #24

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

Conversation

C-D-Lewis
Copy link
Contributor

@C-D-Lewis C-D-Lewis commented Jun 1, 2021

Same pattern as for evrythng.js, as opposed to current way that creates a global value.

Changes:

  • Add separate 'node-style' build output, allowing import ScanThng from 'scanthng'; instead of <script>
  • Existing use of <script> should still work. (TODO: test this)
  • Don't use window to access evrythng and jsQR
  • Require evrythng and jqQR explicitly, allowing use of User scope.

Problems:

  • Bundle size increases from 13K to 183K-333K depending on import method due to including evrythng and jsQR directly.
  • evrythng.settings inside scanthng.js is not affected by evrythng.setup() called in the implementing app...

@C-D-Lewis C-D-Lewis changed the title Begin requirable version Remove peer deps, allow use of 'import' Jun 4, 2021
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.

1 participant