Last active
May 4, 2021 06:52
-
-
Save d4rekanguok/d2727afe38ec4e282bae4b64dcc6d188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
export let name = 'World' | |
</script> | |
<div>Hello {name}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uncaught Error: 'target' is a required option | |
at new SvelteComponentDev (index.mjs?v=9205789b:1666) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import { Component, helper } from "../../dist/component.es"; | |
let name = "Friend" | |
</script> | |
<Component {name} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from './Component.svelte' | |
import { helper } from './helper' | |
export { | |
Component, | |
helper | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineConfig } from 'vite' | |
import svelte from '@sveltejs/vite-plugin-svelte' | |
export default defineConfig({ | |
plugins: [svelte()], | |
build: { | |
lib: { | |
entry: 'src/lib/index.ts', | |
name: 'Component', | |
}, | |
rollupOptions: { | |
external: ['svelte'], | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment