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/LICENSE +21 -21
- package/README.md +408 -408
- package/README.zh-CN.md +408 -408
- package/dist/index.cjs +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
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(
|
|
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(
|
|
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)) {
|