We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d82d888 commit 260461cCopy full SHA for 260461c
1 file changed
packages/tdesign-react/site/vite.config.js
@@ -2,8 +2,9 @@ import react from '@vitejs/plugin-react';
2
import path, { dirname } from 'path';
3
import { fileURLToPath } from 'url';
4
import { defineConfig } from 'vite';
5
-
6
import { VitePWA } from 'vite-plugin-pwa';
+import pkg from '../package.json';
7
+
8
import pwaConfig from './pwaConfig';
9
10
import changelog2Json from './plugins/changelog-to-json';
@@ -31,6 +32,9 @@ const disableTreeShakingPlugin = (paths) => ({
31
32
export default ({ mode }) =>
33
defineConfig({
34
base: publicPathMap[mode],
35
+ define: {
36
+ __VERSION__: JSON.stringify(pkg.version),
37
+ },
38
resolve: {
39
alias: {
40
'tdesign-react/es': path.resolve(__dirname, '../../components'),
0 commit comments