broccoli-anything-to-js

Embed any type of file into a valid JS module, exporting the original file's contents as a string.

Usage no npm install needed!

<script type="module">
  import broccoliAnythingToJs from 'https://cdn.skypack.dev/broccoli-anything-to-js';
</script>

README

broccoli-anything-to-js

Embed any type of file into a valid JS module, exporting the original file's contents as a string.

This is a work in progress

TODOs

  • Add tests
  • Add support for different types of module outputs (only ES6 modules supported now)
  • Document