https://github.com/gamestdio/audiosprite-loader
Audio Sprite Loader and Plugin for Webpack
https://github.com/gamestdio/audiosprite-loader
webpack webpack-loader webpack-plugin
Last synced: 4 months ago
JSON representation
Audio Sprite Loader and Plugin for Webpack
- Host: GitHub
- URL: https://github.com/gamestdio/audiosprite-loader
- Owner: gamestdio
- License: mit
- Created: 2018-02-17T00:32:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T02:36:51.000Z (over 8 years ago)
- Last Synced: 2025-11-23T20:25:44.613Z (7 months ago)
- Topics: webpack, webpack-loader, webpack-plugin
- Language: TypeScript
- Size: 154 KB
- Stars: 3
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webpack Audio Sprite Loader & Plugin
Audio Sprite loader for Webpack. This loader currently only supports [howler.js](https://github.com/goldfire/howler.js/) format. It should be pretty easy to support other audio libraries though.
- [Usage](#usage)
- [Dependencies](#dependencies)
## Usage
Install the loader.
```
npm install audiosprite-loader
```
**`webpack.config.js`**
```javascript
const AudioSprite = require("audiosprite-loader");
module.exports = {
module: {
loaders: [
{
test: /\.(wav|mp3)$/,
loader: AudioSprite.loader()
}
]
},
plugins: [
new AudioSprite.Plugin()
]
}
```
**`index.js`**
```javascript
const audio = require("./audio/file.wav");
audio.play();
```
## Dependencies
You'll need `ffmpeg` installed.
**OSX**
```
brew install ffmpeg --with-theora --with-libvorbis
```
## License
MIT