audiosprite-loader
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

Webpack Audio Sprite Loader & Plugin

Audio Sprite loader for Webpack. This loader currently only supports howler.js format. It should be pretty easy to support other audio libraries though.

Usage

Install the loader.

npm install audiosprite-loader

webpack.config.js

const AudioSprite = require("audiosprite-loader");
 
module.exports = {
    module: {
        loaders: [
            {
              test: /\.(wav|mp3)$/,
              loader: AudioSprite.loader()
            }
        ]
    },
    plugins: [
        new AudioSprite.Plugin()
    ]
}

index.js

const audio = require("./audio/file.wav");
audio.play();

Dependencies

You'll need ffmpeg installed.

OSX

brew install ffmpeg --with-theora --with-libvorbis

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.52latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.52
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i audiosprite-loader

Weekly Downloads

1

Version

0.1.5

License

MIT

Unpacked Size

8.99 kB

Total Files

9

Last publish

Collaborators

  • endel