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.
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