fix: remove vite-tsconfig-paths (#5960)

It will cause storybook from running.
related to https://github.com/aleclarson/vite-tsconfig-paths/issues/132

We are not actually using `vite-tsconfig-paths` now because we rely on package.json's export field to do path mapping.
This commit is contained in:
Peng Xiao
2024-02-29 07:58:41 +00:00
parent 6f8a4d7bd5
commit 752c8580ae
5 changed files with 8 additions and 62 deletions
@@ -2,7 +2,6 @@ import { StorybookConfig } from '@storybook/react-vite';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import { fileURLToPath } from 'url';
import { mergeConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { getRuntimeConfig } from '../../core/.webpack/runtime-config';
export default {
@@ -26,13 +25,7 @@ export default {
},
async viteFinal(config, _options) {
return mergeConfig(config, {
plugins: [
vanillaExtractPlugin(),
tsconfigPaths({
root: fileURLToPath(new URL('../../../../', import.meta.url)),
ignoreConfigErrors: true,
}),
],
plugins: [vanillaExtractPlugin()],
define: {
'process.env': {},
'process.env.COVERAGE': JSON.stringify(!!process.env.COVERAGE),
+6 -6
View File
@@ -1,11 +1,11 @@
/* eslint-disable simple-import-sort/imports */
// Auto generated, do not edit manually
import json_0 from './onboarding/info.json';
import json_1 from './onboarding/blob.json';
import json_2 from './onboarding/W-d9_llZ6rE-qoTiHKTk4.snapshot.json';
import json_0 from './onboarding/W-d9_llZ6rE-qoTiHKTk4.snapshot.json';
import json_1 from './onboarding/info.json';
import json_2 from './onboarding/blob.json';
export const onboarding = {
'info.json': json_0,
'blob.json': json_1,
'W-d9_llZ6rE-qoTiHKTk4.snapshot.json': json_2
'W-d9_llZ6rE-qoTiHKTk4.snapshot.json': json_0,
'info.json': json_1,
'blob.json': json_2
}