npx tsc--init 1. 这将创建一个基础的tsconfig.json文件。 2. 添加配置以排除node_modules 打开tsconfig.json文件,找到"exclude"属性,如果没有这个属性,可以手动添加。确保它看起来像这样: {"compilerOptions":{// 其他配置项},"exclude":["node_modules"// 排除 node_
"scripts": { "build": "vue-tsc --noEmit && vite build", }, 但是node_module中有一个依赖的类型检查存在错误 yarn run v1.22.10 $ vue-tsc --noEmit && vite build node_modules/vxe-table-plugin-element/index.ts:272:26 - error TS2345: Argument of type 'string | undefined' is not assign...
这里要写name、version、type(模块)、main(入口文件)、types(ts声明)、files(指定目录)。 然后在node_modules新建文件夹,名字和name一致。把你写的插件整个复制进来,然后再文件夹里建一个package.json,填写以上信息。因为我写的是ts,所以files必须引入的打包后的dist文件。如果你不用ts开发,你的插件在哪个文件就用...
PropFinalized<...>; ... 8 more ...; readonly collapseOpenIcon: { ...; }; }>> & VNodeProps & AllowedCo...'.14<el-sub-menu>~~~node_modules/element-plus/es/components/menu/index.d.ts:363:14363readonly index:{~~~'index'is declared here.src/view/testDemo/index.vue:27:32-error...
5 ~~~ node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts:616:3 616 src?: string ~~~ The expected type comes from property 'src' which is declared here on type 'ElementAttrs<ImgHTMLAttributes>' src/view/webRTC/index.vue:13:55 - error TS2322: Type '(deviceId: string) => Pro...
"node_modules" ], "vueCompilerOptions": { "experimentalCompatMode": 2 } } vite.config: const config = defineConfig(({ mode }) => { const isProduction = mode === "production"; return { resolve: { alias: { "@": path.resolve(__dirname, "src") ...
}, "compileOnSave":true,/* 保存时自动编译 */ "includes": [/* 包含文件 */ "app/**/*" ], "exclude": [/* 排除文件 */ "node_modules", "dist", "models", "migrations", "seeders", "test" ] } 3.监听变化 1 tsc -w .
{vue,less,scss,css}\"--fix --cache --cache-location node_modules/.cache/stylelint/",# 生成打包分析,执行完成后需要打开 `./build/.cache/stats.html` 查看报告"report":"cross-env REPORT=true npm run build",# 卸载并重新安装依赖"reinstall":"rimraf pnpm-lock.yaml node_modules && npm run ...
报错一 warning package.json: No license field $ vue-tsc --noEmit && vite build 解决方案,添加这两行,只添加一个是没有用的 报错二 node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1193:6 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provide...
vue-tsc Install:npm i vue-tsc -D Usage:vue-tsc --noEmit && vite build Vue 3 command line Type-Checking tool base on IDE pluginVolar. Roadmap: [x] Type-Checking with--noEmit [x] Use released LSP module [x] Maketypescriptas peerDependencies...