From 4bbcaed56bcadc63c4b06d9c24b498644a4f8140 Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Sun, 25 Jun 2017 23:50:42 +0100 Subject: [PATCH 1/6] gitignore vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 80c45fbf35..85622dc119 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .DS_Store docs/_book +.vscode/ \ No newline at end of file From b39d4a00d07d3ddcffabc23fdae47d8785968ef4 Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Sun, 25 Jun 2017 23:51:04 +0100 Subject: [PATCH 2/6] media loader audio and video tag --- template/build/vue-loader.conf.js | 6 +++++- template/build/webpack.base.conf.js | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/template/build/vue-loader.conf.js b/template/build/vue-loader.conf.js index 7aee79bae4..e587e73afb 100644 --- a/template/build/vue-loader.conf.js +++ b/template/build/vue-loader.conf.js @@ -8,5 +8,9 @@ module.exports = { ? config.build.productionSourceMap : config.dev.cssSourceMap, extract: isProduction - }) + }), + transformToRequire: { + video: 'src', + source: 'src' + } } diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index 0f161198d4..a5fe3fdd1b 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -56,6 +56,13 @@ module.exports = { options: { limit: 10000, 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]') } }, { From 19dc6c10e8c421a44a946a8fc8a4e556511e458d Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Mon, 26 Jun 2017 00:19:26 +0100 Subject: [PATCH 3/6] Remove vscode gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 85622dc119..b3ea8d695a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ node_modules .DS_Store -docs/_book -.vscode/ \ No newline at end of file +docs/_book \ No newline at end of file From b6e73acfbb8c689ea6a683115a62f0f3a53d4346 Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Mon, 26 Jun 2017 00:22:15 +0100 Subject: [PATCH 4/6] Add \n back --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b3ea8d695a..80c45fbf35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules .DS_Store -docs/_book \ No newline at end of file +docs/_book From 84384554f5e7ad5e64422e2cbcb0e68ad0d7dbe1 Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Mon, 26 Jun 2017 00:32:22 +0100 Subject: [PATCH 5/6] fix missing closing bracket --- template/build/webpack.base.conf.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template/build/webpack.base.conf.js b/template/build/webpack.base.conf.js index a5fe3fdd1b..71f0fdcf87 100644 --- a/template/build/webpack.base.conf.js +++ b/template/build/webpack.base.conf.js @@ -56,8 +56,9 @@ module.exports = { options: { limit: 10000, name: utils.assetsPath('img/[name].[hash:7].[ext]') - }, - { + } + }, + { test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, loader: 'url-loader', options: { From 57ac535305619d59fb2b8323317d1653fc137218 Mon Sep 17 00:00:00 2001 From: Ffloriel Date: Mon, 26 Jun 2017 20:31:00 +0100 Subject: [PATCH 6/6] add default values (img, image) --- template/build/vue-loader.conf.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/template/build/vue-loader.conf.js b/template/build/vue-loader.conf.js index e587e73afb..8a346d5222 100644 --- a/template/build/vue-loader.conf.js +++ b/template/build/vue-loader.conf.js @@ -10,7 +10,9 @@ module.exports = { extract: isProduction }), transformToRequire: { - video: 'src', - source: 'src' - } + video: 'src', + source: 'src', + img: 'src', + image: 'xlink:href' + } }