Code Monkey home page Code Monkey logo

Comments (7)

sisou avatar sisou commented on August 11, 2024 3

For v3 compatibility, check the PR I just opened: #5.

To export a custom element, add

svelte({
  customElement: true,
  tag: 'my-tag-name'
}),

to the rollup.config.js plugins section. (You can also add <svelte:options tag="my-tag-name"> to the component file.)

from component-template.

YogliB avatar YogliB commented on August 11, 2024 2

I've made a template based on the app and component template.

It's Svelte 3 based, but other than that it works exactly the same and you can preview your app running npm run dev, just as you would do in the full-blown app.

from component-template.

sisou avatar sisou commented on August 11, 2024 1

Coming from a fresh copy, I do not get that error. Do you use any special code? Also, the extension for Svelte v3 is .svelte. Have you tried that?

from component-template.

dmitry-kurmanov avatar dmitry-kurmanov commented on August 11, 2024 1

@sisou you are right. It was a mistake on my side. It correctly compiles.

from component-template.

pngwn avatar pngwn commented on August 11, 2024 1

The template is now updated for v3.

from component-template.

asif-ahmed-1990 avatar asif-ahmed-1990 commented on August 11, 2024

@sisou Thanks. Will try it out

from component-template.

dmitry-kurmanov avatar dmitry-kurmanov commented on August 11, 2024

@asifahmedfw @sisou the PR above doesn't compile with the:

 "svelte": "^3.2.1"

I've got an error:

[!] (svelte plugin) Error: Unrecognized option 'onwarn'
src\index.html
Error: Unrecognized option 'onwarn'
    at Object.keys.forEach.key (c:\Users\kurmanov.dmitry\Desktop\my-new-component\node_modules\svelte\compiler.js:23690:20)

from component-template.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.