From 7fdfda9a5b6a4f6dd89d5dbc1f430327e747a4a8 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 15 Nov 2022 16:26:45 +0800 Subject: [PATCH] fix: HBuilderX uni-app types for vue2 --- packages/vue-cli-plugin-uni/lib/configure-webpack.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/vue-cli-plugin-uni/lib/configure-webpack.js b/packages/vue-cli-plugin-uni/lib/configure-webpack.js index a2c171b24f..54cdc40bbd 100644 --- a/packages/vue-cli-plugin-uni/lib/configure-webpack.js +++ b/packages/vue-cli-plugin-uni/lib/configure-webpack.js @@ -109,9 +109,14 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt configFile: tsConfigJsonFile, compilerOptions: { baseUrl: context, - typeRoots: [resolveModule('@dcloudio/types'), resolveModule('@types')], + typeRoots: [ + resolveModule('@dcloudio/types'), + resolveModule('@types'), + path.resolve(process.env.UNI_CLI_CONTEXT, 'types') + ], types: [ 'uni-app', + 'uni-app-vue2', 'webpack-env' ], paths: { -- GitLab