internetarchive / internetarchive/dweb-archivecontroller

Compatability with ES6 Modules

Open
#2 1 comment 0 reactions 1 assignee Claimed by @jbuckner View on GitHub
Dominant language
JavaScript
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

** Context **
The current repo is used by dweb-mirror via Node, and dweb-archive via webpack.
Both of these are happy with "require"

However, Jason wants to use it with ES6 Modules, and that only works with `import`

**Proposal and Constraints**
Change all require's for import and fix any problems that arise

**Success Metrics**
If Jason can import dweb-archivecontroller/ArchiveItem, ArchiveFile, ArchiveMember into his Lit based web components.
AND
We can still successfully include it by running `webpack --mode production` in dweb-archive repo,
AND successfully include it by running "internetarchive -sc"
i.e. this solution should include PR's in both those repo's if required.

**Stakeholders**
@jbuckner @mitra42

**Resources and Links**
https://timonweb.com/tutorials/how-to-enable-ecmascript-6-imports-in-nodejs/ describes how to use esm to run import in Node

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.