@qlover/create-app 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @qlover/create-app
2
2
 
3
+ ## 0.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ #### ✨ Features
8
+
9
+ - enhance Vite configuration and add new dependencies for improved build performance ([e14ee42](https://github.com/qlover/fe-base/commit/e14ee428d46fc48decb99762103c25d6e6c8535e)) ([#418](https://github.com/qlover/fe-base/pull/418))
10
+
11
+ - Added `terser` for advanced minification options, including console log removal and improved compression.
12
+ - Introduced `vite-plugin-imp` to optimize Ant Design imports, reducing bundle size and improving load times.
13
+ - Updated Vite configuration to define manual chunks for better code splitting and chunk management.
14
+
15
+
16
+ Co-authored-by: QRJ <renjie.qin@brain.im>
17
+
3
18
  ## 0.3.4
4
19
 
5
20
  ### Patch Changes
@@ -15,8 +30,7 @@
15
30
  - Refactored DialogHandler to manage Ant Design's static APIs globally.
16
31
  - Improved overall code structure and organization for better maintainability.
17
32
 
18
-
19
- Co-authored-by: QRJ <renjie.qin@brain.im>
33
+ Co-authored-by: QRJ <renjie.qin@brain.im>
20
34
 
21
35
  - enhance React app with improved configuration management and new components ([67f88cb](https://github.com/qlover/fe-base/commit/67f88cbc7cc0ebab51cbd33be66f98117fc2cf21)) ([#414](https://github.com/qlover/fe-base/pull/414))
22
36
 
@@ -26,30 +40,28 @@
26
40
  - Updated various API adapters to utilize the new AppConfig structure for better maintainability.
27
41
  - Removed outdated DialogHandler implementation and reorganized related files for improved clarity.
28
42
 
29
-
30
- Co-authored-by: QRJ <renjie.qin@brain.im>
43
+ Co-authored-by: QRJ <renjie.qin@brain.im>
31
44
 
32
45
  - integrate @brain-toolkit/antd-theme-override for improved Ant D… ([4ebb081](https://github.com/qlover/fe-base/commit/4ebb081d89397424c459dd7f885817152098e322)) ([#414](https://github.com/qlover/fe-base/pull/414))
33
46
 
47
+ - feat: integrate @brain-toolkit/antd-theme-override for improved Ant Design support
34
48
 
35
- * feat: integrate @brain-toolkit/antd-theme-override for improved Ant Design support
49
+ * Added @brain-toolkit/antd-theme-override as a dependency to enhance theming capabilities.
50
+ * Updated imports to utilize the new theming library, replacing the deprecated antd-overried references.
51
+ * Removed outdated files related to the previous Ant Design integration to streamline the codebase.
52
+ * Refactored components to leverage the new theme provider and static API interface for notifications and modals.
36
53
 
37
- - Added @brain-toolkit/antd-theme-override as a dependency to enhance theming capabilities.
38
- - Updated imports to utilize the new theming library, replacing the deprecated antd-overried references.
39
- - Removed outdated files related to the previous Ant Design integration to streamline the codebase.
40
- - Refactored components to leverage the new theme provider and static API interface for notifications and modals.
54
+ Co-authored-by: QRJ <renjie.qin@brain.im>
41
55
 
42
- Co-authored-by: QRJ <renjie.qin@brain.im>
43
-
44
- * feat(I18nService): add translation method for improved localization support
56
+ - feat(I18nService): add translation method for improved localization support
45
57
 
46
- - Implemented a new `t` method in the I18nService class to facilitate key-based translations.
47
- - The method accepts a translation key and optional parameters, returning the translated value or the key if no translation is found.
48
- - Enhanced localization handling to improve user experience across the application.
58
+ * Implemented a new `t` method in the I18nService class to facilitate key-based translations.
59
+ * The method accepts a translation key and optional parameters, returning the translated value or the key if no translation is found.
60
+ * Enhanced localization handling to improve user experience across the application.
49
61
 
50
- ---------
62
+ ***
51
63
 
52
- Co-authored-by: QRJ <renjie.qin@brain.im>
64
+ Co-authored-by: QRJ <renjie.qin@brain.im>
53
65
 
54
66
  ## 0.3.3
55
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qlover/create-app",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.cjs",
@@ -51,9 +51,9 @@
51
51
  "inquirer": "^12.3.2",
52
52
  "ora": "^8.1.1",
53
53
  "lodash": "^4.17.21",
54
+ "@qlover/scripts-context": "0.2.1",
54
55
  "@qlover/logger": "0.1.1",
55
- "@qlover/fe-corekit": "1.4.0",
56
- "@qlover/scripts-context": "0.2.1"
56
+ "@qlover/fe-corekit": "1.4.0"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "rollup -c",
@@ -97,9 +97,11 @@
97
97
  "prettier": "^3.5.3",
98
98
  "sass-embedded": "^1.79.4",
99
99
  "tailwindcss": "^4.1.8",
100
+ "terser": "^5.41.0",
100
101
  "typescript": "^5.6.3",
101
102
  "typescript-eslint": "^8.15.0",
102
103
  "vite-plugin-cross-origin-isolation": "^0.1.6",
104
+ "vite-plugin-imp": "^2.4.0",
103
105
  "vite-tsconfig-paths": "^5.1.4",
104
106
  "vitest": "^3.0.5"
105
107
  }
@@ -8,11 +8,73 @@ import ts2Locales from '@brain-toolkit/ts2locales/vite';
8
8
  import i18nConfig from './config/i18n';
9
9
  import tailwindcss from '@tailwindcss/vite';
10
10
  import viteDeprecatedAntd from '@brain-toolkit/antd-theme-override/vite';
11
+ import vitePluginImp from 'vite-plugin-imp';
11
12
 
12
13
  // https://vite.dev/config/
13
14
  export default defineConfig({
15
+ build: {
16
+ rollupOptions: {
17
+ output: {
18
+ manualChunks: {
19
+ 'react-vendor': ['react', 'react-dom', 'react-router-dom'],
20
+ 'antd-core': [
21
+ 'antd/es/config-provider',
22
+ 'antd/es/theme',
23
+ 'antd/es/locale'
24
+ ],
25
+ 'antd-basic': [
26
+ 'antd/es/button',
27
+ 'antd/es/input',
28
+ 'antd/es/form',
29
+ 'antd/es/select'
30
+ ],
31
+ 'antd-advanced': [
32
+ 'antd/es/progress',
33
+ 'antd/es/card',
34
+ 'antd/es/space',
35
+ 'antd/es/tag',
36
+ 'antd/es/table'
37
+ ],
38
+ utils: ['lodash/random', 'lodash/merge', 'lodash/get', 'lodash/set'],
39
+ i18n: ['i18next', 'react-i18next']
40
+ }
41
+ }
42
+ },
43
+ chunkSizeWarningLimit: 600,
44
+ minify: 'terser',
45
+ terserOptions: {
46
+ compress: {
47
+ drop_console: true,
48
+ drop_debugger: true,
49
+ pure_funcs: [
50
+ 'console.log',
51
+ 'console.info',
52
+ 'console.debug',
53
+ 'console.time',
54
+ 'console.timeEnd'
55
+ ],
56
+ passes: 2,
57
+ toplevel: true
58
+ },
59
+ format: {
60
+ comments: false
61
+ },
62
+ mangle: {
63
+ safari10: true
64
+ }
65
+ }
66
+ },
14
67
  plugins: [
15
68
  tailwindcss(),
69
+ vitePluginImp({
70
+ libList: [
71
+ {
72
+ libName: 'antd',
73
+ style: (name) => `antd/es/${name}/style/index`,
74
+ libDirectory: 'es'
75
+ }
76
+ ]
77
+ }),
16
78
  envConfig({
17
79
  envPops: true,
18
80
  envPrefix,