vite-plugin-dts 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -594,6 +594,7 @@ function rollupDeclarationFiles({
594
594
 
595
595
  const noneExport = "export {};\n";
596
596
  const vueRE = /\.vue$/;
597
+ const svelteRE = /\.svelte$/;
597
598
  const tsRE = /\.(m|c)?tsx?$/;
598
599
  const jsRE = /\.(m|c)?jsx?$/;
599
600
  const dtsRE = /\.d\.(m|c)?tsx?$/;
@@ -674,6 +675,9 @@ ${cyan(
674
675
  }
675
676
  } else if (!id.includes(".vue?vue") && (tsRE.test(id) || allowJs && jsRE.test(id))) {
676
677
  project.createSourceFile(id, await fs.readFile(id, "utf-8"), { overwrite: true });
678
+ } else if (svelteRE.test(id)) {
679
+ const content = "export { SvelteComponentTyped as default } from 'svelte/internal';";
680
+ project.createSourceFile(`${id}.ts`, content, { overwrite: true });
677
681
  }
678
682
  }
679
683
  return {
@@ -709,7 +713,7 @@ ${cyan(
709
713
  `
710
714
  ${cyan(
711
715
  "[vite:dts]"
712
- )} You building not a library that may not need to generate declaration files.
716
+ )} You are building a library that may not need to generate declaration files.
713
717
  `
714
718
  )
715
719
  );
@@ -734,7 +738,7 @@ ${cyan(
734
738
  `
735
739
  ${cyan(
736
740
  "[vite:dts]"
737
- )} Can not resolve declaration directory, please check your vite config and plugin options.
741
+ )} Can not resolve declaration directory. Please check your vite config and plugin options.
738
742
  `
739
743
  )
740
744
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-dts",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "qmhc",