Skip to content

Commit

Permalink
Set webpack target to node
Browse files Browse the repository at this point in the history
  • Loading branch information
Ornhoj committed Feb 28, 2018
1 parent 7916aeb commit 5d9bda7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/skyvideo.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/skyvideo.min.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/SkyVideo.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import YoutubePlayer from 'youtube-player';
// import VimeoPlayer from '@vimeo/player';
import VimeoPlayer from '@vimeo/player';
import GetVideoId from 'get-video-id';
import SkyWindow from 'sky-window';
Expand Down Expand Up @@ -114,7 +114,7 @@ export default {
loop: this.loop ? 1 : 0,
},
});
} /* else {
} else {
// Settings: https://github.com/vimeo/player.js
this.player = new VimeoPlayer(this.$refs.player, {
width: this.width,
Expand All @@ -125,7 +125,7 @@ export default {
title: this.info,
//color: 'ff0000', // Color supplementing the gray UI
});
} */
}
SkyWindow.resize.subscribe(() => {
this.setContainer();
Expand Down Expand Up @@ -160,17 +160,17 @@ export default {
});
}
// if (this.isVimeo) {
// this.player.ready()
// .then(() => {
// if (this.mute) {
// this.player.setVolume(0);
// }
if (this.isVimeo) {
this.player.ready()
.then(() => {
if (this.mute) {
this.player.setVolume(0);
}
// this.embedded = true;
// this.player.play();
// });
// }
this.embedded = true;
this.player.play();
});
}
}
},
shouldAutoplay() {
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ module.exports = [
},
}),
merge(config, {
target: 'node',
entry: path.resolve(__dirname + '/src/' + name + '.vue'),
output: {
filename: name.toLowerCase() + '.js',
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ copy-concurrently@^1.0.0:
rimraf "^2.5.4"
run-queue "^1.0.0"

core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0:
core-js@^2.4.0, core-js@^2.5.0:
version "2.5.3"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"

Expand Down Expand Up @@ -2600,7 +2600,7 @@ lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"

lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.4:
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@~4.17.4:
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"

Expand Down

0 comments on commit 5d9bda7

Please sign in to comment.