🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 实例 ``` npx degit sveltejs/component-template my-new-component ``` Component.svelte ``` <svelte:options tag="auto-complete" /> <main> <p>hello world</p> </main> ``` rollup.config.js 添加 ` customElement: true,` ``` plugins: [ svelte({ compilerOptions: { customElement: true, } }), resolve() ] ``` 应用 ``` <script src="dist/index.js"></script> <auto-complete /> ```