mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 16:44:21 +00:00
chore: unify deps version (#9829)
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* @babel/preset-typescript 不支持编译 Vue 文件中的 ts 代码
|
||||
* 通过手动添加 @babel/plugin-transform-typescript 的方式来解决这个问题
|
||||
* see: https://github.com/babel/babel-loader/pull/738
|
||||
*/
|
||||
|
||||
const { readFileSync } = require('fs');
|
||||
const { declare } = require('@babel/helper-plugin-utils');
|
||||
|
||||
module.exports = declare(() => ({
|
||||
overrides: [
|
||||
{
|
||||
test: (filePath) => {
|
||||
if (/\.vue$/.test(filePath)) {
|
||||
const template = readFileSync(filePath, { encoding: 'utf8' });
|
||||
return (
|
||||
template.includes('lang="ts"') || template.includes("lang='ts'")
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
plugins: [require('@babel/plugin-transform-typescript')],
|
||||
},
|
||||
],
|
||||
}));
|
@@ -17,7 +17,6 @@ module.exports = function (api, options) {
|
||||
},
|
||||
],
|
||||
require.resolve('@babel/preset-typescript'),
|
||||
require('./babel-preset-vue-ts.cjs'),
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
|
@@ -43,7 +43,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/helper-plugin-utils": "^7.14.5",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@docsearch/css": "3.0.0-alpha.41",
|
||||
|
@@ -35,7 +35,7 @@ function runCommand(
|
||||
function eslint() {
|
||||
return runCommand(
|
||||
'eslint',
|
||||
['./src', '--fix', '--ext', [SCRIPT_EXTS, '.md'].join(',')],
|
||||
['./src', '--fix', '--ext', SCRIPT_EXTS.join(',')],
|
||||
{
|
||||
start: 'Running eslint...',
|
||||
succeed: 'ESLint Passed.',
|
||||
|
1
packages/vant-cli/src/module.d.ts
vendored
1
packages/vant-cli/src/module.d.ts
vendored
@@ -5,4 +5,3 @@ declare module 'clean-css';
|
||||
declare module 'release-it';
|
||||
declare module 'conventional-changelog';
|
||||
declare module '@vant/markdown-vetur';
|
||||
declare module '@babel/helper-plugin-utils';
|
||||
|
Reference in New Issue
Block a user