vite-plugin-dts 4.0.2 → 4.0.3

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.cjs CHANGED
@@ -203,7 +203,10 @@ function getTsConfig(tsConfigPath, readFileSync) {
203
203
  function getTsLibFolder({ root, entryRoot }) {
204
204
  let libFolder;
205
205
  try {
206
- libFolder = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))).resolve("typescript").replace(/node_modules\/typescript.*/, "node_modules/typescript");
206
+ libFolder = normalizePath(node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))).resolve("typescript")).replace(
207
+ /node_modules\/typescript.*/,
208
+ "node_modules/typescript"
209
+ );
207
210
  } catch {
208
211
  libFolder = resolve(root, "node_modules/typescript");
209
212
  if (!node_fs.existsSync(libFolder)) {
package/dist/index.mjs CHANGED
@@ -199,7 +199,10 @@ function getTsConfig(tsConfigPath, readFileSync) {
199
199
  function getTsLibFolder({ root, entryRoot }) {
200
200
  let libFolder;
201
201
  try {
202
- libFolder = createRequire(import.meta.url).resolve("typescript").replace(/node_modules\/typescript.*/, "node_modules/typescript");
202
+ libFolder = normalizePath(createRequire(import.meta.url).resolve("typescript")).replace(
203
+ /node_modules\/typescript.*/,
204
+ "node_modules/typescript"
205
+ );
203
206
  } catch {
204
207
  libFolder = resolve(root, "node_modules/typescript");
205
208
  if (!existsSync(libFolder)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-dts",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@8.3.0",
6
6
  "license": "MIT",