mirror of https://github.com/sveltejs/svelte
commit
846c882665
@ -1,19 +1,3 @@
|
||||
declare module '*.svelte' {
|
||||
type Props = Record<string, any>;
|
||||
|
||||
export default class {
|
||||
constructor(options: {
|
||||
target: Element;
|
||||
anchor?: Element;
|
||||
props?: Props;
|
||||
hydrate?: boolean;
|
||||
intro?: boolean;
|
||||
});
|
||||
|
||||
$set(props: Props): void;
|
||||
$on<T = any>(event: string, callback: (event: CustomEvent<T>) => void): () => void;
|
||||
$destroy(): void;
|
||||
|
||||
[accessor: string]: any;
|
||||
}
|
||||
export { SvelteComponentDev as default } from 'svelte/internal';
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
export default {
|
||||
preprocess: [
|
||||
{
|
||||
script: ({ content }) => ({ code: content.replace(/one/g, 'two') }),
|
||||
style: ({ content }) => ({ code: content.replace(/one/g, 'three') }),
|
||||
},
|
||||
],
|
||||
};
|
@ -0,0 +1,25 @@
|
||||
<style>
|
||||
one
|
||||
</style>
|
||||
|
||||
<script>
|
||||
one
|
||||
</script>
|
||||
|
||||
<!-- <style>
|
||||
one
|
||||
</style> -->
|
||||
|
||||
<!-- <script>
|
||||
one
|
||||
</script> -->
|
||||
|
||||
<style>
|
||||
<!-- one -->
|
||||
</style>
|
||||
|
||||
<script>
|
||||
<!-- one -->
|
||||
</script>
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
<style>
|
||||
three
|
||||
</style>
|
||||
|
||||
<script>
|
||||
two
|
||||
</script>
|
||||
|
||||
<!-- <style>
|
||||
one
|
||||
</style> -->
|
||||
|
||||
<!-- <script>
|
||||
one
|
||||
</script> -->
|
||||
|
||||
<style>
|
||||
<!-- three -->
|
||||
</style>
|
||||
|
||||
<script>
|
||||
<!-- two -->
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in new issue