You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
429 B
18 lines
429 B
import fs from "fs";
|
|
import path from "path";
|
|
|
|
const dtsPath = path.resolve(
|
|
import.meta.dirname,
|
|
"../node_modules/vue-router/dist/vue-router.d.ts"
|
|
);
|
|
|
|
const content = fs.readFileSync(dtsPath, "utf8");
|
|
|
|
const fixedContent = content.replace(
|
|
/declare module ['"]vue['"]/g,
|
|
"declare module '@vue/runtime-core'"
|
|
);
|
|
|
|
fs.writeFileSync(dtsPath, fixedContent, "utf8");
|
|
|
|
console.log("Fixed vue-router.d.ts module declaration.");
|
|
|