goatandsheep/swarmpack

Convert to a media loader

Opened this issue · 2 comments

Instead of including javascript loaders, focus on file loading

  1. First add file-loader
yarn add file-loader
  1. Update webpack with file-loader support.
module.exports = {
    entry: '.index.js',
    output: {
        filename: 'bundle.js',
        path: __dirname
    },
    module: {
      rules: [
        {
          test: /\.(png|mov|gif)$/i, // or whatever file type you want
          use: [
            {
              loader: 'file-loader',
            },
          ],
        },
      ],
    },
}

No need ☺️ I'll use blob storage. This is going to be for front end btw. I'm likely going to

  • convert it to a class library
  • add a key-value storage for blobs
  • use webtorrent inside the library
  • connect to window object
  • obtain info from data-* props

This package is currently so over-engineered, it's gross. 🤮