Skip to content

Commit 7da2e9e

Browse files
Fflorieladdyosmani
authored andcommitted
video audio loader (#57)
1 parent 7eeeed5 commit 7da2e9e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

template/build/vue-loader.conf.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ module.exports = {
88
? config.build.productionSourceMap
99
: config.dev.cssSourceMap,
1010
extract: isProduction
11-
})
11+
}),
12+
transformToRequire: {
13+
video: 'src',
14+
source: 'src',
15+
img: 'src',
16+
image: 'xlink:href'
17+
}
1218
}

template/build/webpack.base.conf.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ module.exports = {
5858
name: utils.assetsPath('img/[name].[hash:7].[ext]')
5959
}
6060
},
61+
{
62+
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
63+
loader: 'url-loader',
64+
options: {
65+
limit: 10000,
66+
name: utils.assetsPath('media/[name].[hash:7].[ext]')
67+
}
68+
},
6169
{
6270
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
6371
loader: 'url-loader',

0 commit comments

Comments
 (0)