@@ -2,19 +2,19 @@ import path from 'path';
2
2
import { createUnplugin } from 'unplugin' ;
3
3
import { outdent } from 'outdent' ;
4
4
5
- const reactInSvelte = createUnplugin ( ( ) => {
5
+ export const sveltrisReactInSvelte = createUnplugin ( ( ) => {
6
6
return {
7
- name : 'react-in-svelte' ,
7
+ name : 'sveltris- react-in-svelte' ,
8
8
resolveId ( id ) {
9
- if ( / ^ r e a c t - i n - s v e l t e .s v e l t e / . test ( id ) ) {
9
+ if ( / ^ s v e l t r i s - r e a c t - i n - s v e l t e .s v e l t e / . test ( id ) ) {
10
10
return { id : id } ;
11
11
}
12
12
} ,
13
13
loadInclude ( id ) {
14
- return / ^ r e a c t - i n - s v e l t e .s v e l t e / . test ( id ) ;
14
+ return / ^ s v e l t r i s - r e a c t - i n - s v e l t e .s v e l t e / . test ( id ) ;
15
15
} ,
16
16
load ( id ) {
17
- if ( / ^ r e a c t - i n - s v e l t e .s v e l t e \? p a t h = / . test ( id ) ) {
17
+ if ( / ^ s v e l t r i s - r e a c t - i n - s v e l t e .s v e l t e \? p a t h = / . test ( id ) ) {
18
18
return outdent `
19
19
<script>
20
20
import { onMount, createEventDispatcher, onDestroy, afterUpdate } from 'svelte';
@@ -64,7 +64,7 @@ const reactInSvelte = createUnplugin(() => {
64
64
const { name } = path . parse ( id ) ;
65
65
66
66
return outdent `
67
- import Comp$${ name } from "react-in-svelte.svelte?path=${ id . replace (
67
+ import Comp$${ name } from "sveltris- react-in-svelte.svelte?path=${ id . replace (
68
68
'?in-svelte' ,
69
69
''
70
70
) } "
@@ -74,9 +74,3 @@ const reactInSvelte = createUnplugin(() => {
74
74
} ,
75
75
} ;
76
76
} ) ;
77
-
78
- export const {
79
- esbuild : reactInSvelteEsbuildPlugin ,
80
- vite : reactInSvelteVitePlugin ,
81
- webpack : reactInSvelteWebpackPlugin ,
82
- } = reactInSvelte ;
0 commit comments