Comments (7)
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.
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.
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.
@sisou you are right. It was a mistake on my side. It correctly compiles.
from component-template.
The template is now updated for v3.
from component-template.
@sisou Thanks. Will try it out
from component-template.
@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)
- Repository as template
- Binding a DOM element doesn't work when imported in a different project HOT 1
- Build error: " `this` has been rewritten to `undefined` " HOT 2
- Advanced examples with multiple components? HOT 7
- warning: option.name should be capitalized
- some documentation suggestions HOT 1
- Storybook implementation HOT 3
- Document how to use a component outside of svelte HOT 2
- Add a TypeScript component template HOT 19
- Local dev server for building and testing components HOT 12
- What is the meaning of these lines in rollup.config.js? HOT 5
- Why does it need to be a template only project, why not a full CLI? HOT 4
- emitCss HOT 1
- Custom Element build target is missing HOT 2
- ES5 transpiling ? HOT 3
- Preprocessor support HOT 13
- how to use it? what is .mjs file? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from component-template.