vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.78k stars 152 forks source link

bug: Nuxt.js support version 5.0.31 #218

Closed 1shaked closed 3 years ago

1shaked commented 3 years ago

I am using Vime and with version 5.0.28 and that works fine when I upgrade to version 5.0.31 I get an error. When running local and with docker.

RROR in ./node_modules/@vime/core/dist/custom-elements/index.js 20:15

9 16.44 Module parse failed: Unexpected token (20:15)

9 16.44 You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

9 16.44 | timeout = setTimeout(() => {

9 16.44 | if (attempt === maxRetries) {

9 16.44 > onFail?.();

9 16.44 | return;

9 16.44 | }

9 16.44 @ ./node_modules/@vime/vue/dist/esm/index.js 1:0-84 1:0-84 1:0-84 1:0-84 1:0-84

9 16.44 @ ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./components/test.vue?vue&type=script&lang=js&

9 16.44 @ ./components/test.vue?vue&type=script&lang=js&

9 16.44 @ ./components/test.vue

9 16.44 @ ./.nuxt/components/plugin.js

9 16.44 @ ./.nuxt/index.js

9 16.44 @ ./.nuxt/client.js

9 16.44 @ multi ./node_modules/@nuxt/components/lib/installComponents.js ./.nuxt/client.js

9 16.44

9 16.44 FATAL Nuxt build error

9 16.44

9 16.44 at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:2127:21)

9 16.44 at processTicksAndRejections (internal/process/task_queues.js:95:5)

9 16.44 at async WebpackBundler.build (node_modules/@nuxt/webpack/dist/webpack.js:2076:5)

9 16.44 at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:327:5)

9 16.44 at async Object.run (node_modules/@nuxt/cli/dist/cli-build.js:110:7)

9 16.44 at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:413:7)

9 16.44

9 16.44

9 16.44 ╭─────────────────────────────╮

9 16.44 │ │

9 16.44 │ ✖ Nuxt Fatal Error │

9 16.44 │ │

9 16.44 │ Error: Nuxt build error │

Bug Report

Vime version:

Current behavior: failed to build when running docker image

Steps to reproduce: create nuxt app add vime via install

and create a component with client only tag as a wrapper

`

` run docker build with version 5.0.31 and with version 5.0.28

Related code: Screen Shot 2021-07-01 at 12 13 17

Other information:

sniperadmin commented 3 years ago

@1shaked in nuxt config, just add the package in the transpile array like this

build: {
  transpile: ["@vime/vue", "@vime/core"]
}
1shaked commented 3 years ago

I will try thanks will update soon

sniperadmin commented 3 years ago

Absolutely! pleasure to help!

1shaked commented 3 years ago

Works thanks