alvarosabu / slidev-theme-penguin

A Penguin 🐧 theme for Slidev
https://slidev-theme-penguin.alvarosaburido.dev/
152 stars 49 forks source link

Theme not working #8

Open jesielviana opened 3 years ago

jesielviana commented 3 years ago

I installed the penguin theme, but it's not working. When I open the slides, the following message appears:

Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/node_modules/slidev-theme-penguin/components/corner-curves/assets/curve-big.svg') is not a valid name.

alvarosabu commented 3 years ago

Hey thanks for reporting @jesielviana . Did you install the last version?

I also had the issue but I changed the assets from the location in this PR https://github.com/alvarosaburido/slidev-theme-penguin/pull/6 and worked. Let me know if it's still the case and I will check it

border1px commented 2 years ago

hi,I installed v1.1.2 with the same error:

runtime-dom.esm-bundler.js:21 Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/node_modules/slidev-theme-penguin/components/corner-curves/assets/curve-big.svg') is not a valid name.

unotovive commented 2 years ago

I couldn't start due to the same phenomenon

alvarosabu commented 2 years ago

I'm gonna take care of this asap, thanks for reporting

alvarosabu commented 2 years ago

@jesielviana @unotovive @border-1px There is a workaround by installing this package vite-svg-loader and adding a vite.config.js on your project

import svgLoader from 'vite-svg-loader'

export default {
  plugins: [svgLoader()],
}

I will try to investigate if there is a way of having this by default when installing instead of adding it manually. Let me know if it works I just tested it.

unotovive commented 2 years ago

@alvarosaburido Thank you for your quick reply. I added it manually and it worked fine.

lyqht commented 2 years ago

@jesielviana @unotovive @border-1px There is a workaround by installing this package vite-svg-loader and adding a vite.config.js on your project

import svgLoader from 'vite-svg-loader'

export default {
  plugins: [svgLoader()],
}

I will try to investigate if there is a way of having this by default when installing instead of adding it manually. Let me know if it works I just tested it.

adding the svg loader helped!

diepoe commented 2 years ago

When importing another svg file to display with a img tag, using svg-loader is breaking the build because the svg file included with the <img/> tag couldn't be imported right. Do you have any ideas to resolve this issue?