Skip to content

Commit

Permalink
video audio loader (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ffloriel authored and addyosmani committed Aug 9, 2017
1 parent 7eeeed5 commit 7da2e9e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion template/build/vue-loader.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ module.exports = {
? config.build.productionSourceMap
: config.dev.cssSourceMap,
extract: isProduction
})
}),
transformToRequire: {
video: 'src',
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
8 changes: 8 additions & 0 deletions template/build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ module.exports = {
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
Expand Down

0 comments on commit 7da2e9e

Please sign in to comment.