From 64a2c6ff82ea578911dec42296ff290522fce4e8 Mon Sep 17 00:00:00 2001 From: undefined Date: Thu, 3 Feb 2022 21:33:56 +0800 Subject: [PATCH] build: inject tsconfig --- build/prepare.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/build/prepare.js b/build/prepare.js index 2fe5b1cf8..7a1eee6ec 100644 --- a/build/prepare.js +++ b/build/prepare.js @@ -44,6 +44,29 @@ const configFlat = { exclude: [], }; +fs.writeFileSync(path.resolve(process.cwd(), 'packages', 'ui-default', 'tsconfig.json'), JSON.stringify({ + exclude: [ + './public', + ], + compilerOptions: { + resolveJsonModule: true, + jsx: 'react', + module: 'es2020', + allowSyntheticDefaultImports: true, + target: 'ES2020', + lib: [ + 'ES2020', + ], + baseUrl: '.', + moduleResolution: 'node', + paths: { + 'vj/*': [ + './*', + ], + }, + }, +})); + const packages = fs.readdirSync(path.resolve(process.cwd(), 'packages')); for (const package of packages) { if (package === 'ui-default') continue;