mirror of
https://github.com/youzan/vant.git
synced 2026-05-07 01:01:01 +08:00
Merge branch 'dev' into next
This commit is contained in:
@@ -31,6 +31,12 @@ yarn add stylelint@13 @vant/stylelint-config
|
||||
|
||||
现在会默认生成 WebStorm 所需的 web-types.json 文件到 `lib/web-types.json` 目录下。
|
||||
|
||||
## v4.0.4
|
||||
|
||||
`2022-07-02`
|
||||
|
||||
- 修复构建 sfc 文件的类型定义时报错的问题
|
||||
|
||||
## v4.0.3
|
||||
|
||||
`2022-07-02`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/cli",
|
||||
"version": "4.0.3",
|
||||
"version": "4.0.4",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
|
||||
@@ -87,11 +87,6 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
new Promise((resolve) => {
|
||||
let script = '';
|
||||
|
||||
// the generated render fn lacks type definitions
|
||||
if (lang === 'ts') {
|
||||
script += '// @ts-nocheck\n';
|
||||
}
|
||||
|
||||
let bindingMetadata;
|
||||
if (descriptor.scriptSetup) {
|
||||
const { bindings, content } = compileScript(descriptor, {
|
||||
@@ -125,6 +120,12 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
|
||||
script += `\n${EXPORT} ${VUEIDS}`;
|
||||
|
||||
// ts-nocheck should be placed on the first line
|
||||
// the generated render fn lacks type definitions
|
||||
if (lang === 'ts') {
|
||||
script = '// @ts-nocheck\n' + script;
|
||||
}
|
||||
|
||||
outputFile(scriptFilePath, script).then(resolve);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user