@igstack/app-catalog-frontend-build-vite 4.0.0 → 5.0.0-alpha-20260922004708
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.
|
@@ -2,6 +2,13 @@ import { ManifestOptions } from 'vite-plugin-pwa';
|
|
|
2
2
|
export declare function frontendViteConfig(options?: {
|
|
3
3
|
appRoot?: string;
|
|
4
4
|
pwa?: {
|
|
5
|
+
/**
|
|
6
|
+
* Register VitePWA. Set `false` in a consumer that registers its own
|
|
7
|
+
* VitePWA: two registrations both write `sw.js` and
|
|
8
|
+
* `manifest.webmanifest`, and which precache manifest survives is decided
|
|
9
|
+
* by plugin order.
|
|
10
|
+
*/
|
|
11
|
+
enabled?: boolean;
|
|
5
12
|
manifest?: Partial<ManifestOptions>;
|
|
6
13
|
registerType?: 'autoUpdate' | 'prompt';
|
|
7
14
|
selfDestroying?: boolean;
|
|
@@ -6,7 +6,7 @@ import { VitePWA } from "vite-plugin-pwa";
|
|
|
6
6
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
7
7
|
import svgr from "vite-plugin-svgr";
|
|
8
8
|
function frontendViteConfig(options) {
|
|
9
|
-
var _a, _b, _c;
|
|
9
|
+
var _a, _b, _c, _d;
|
|
10
10
|
const plugins = [];
|
|
11
11
|
if (options == null ? void 0 : options.appRoot) {
|
|
12
12
|
const appPublicDir = sp.join(options.appRoot, "public");
|
|
@@ -27,79 +27,81 @@ function frontendViteConfig(options) {
|
|
|
27
27
|
})
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
manifest: {
|
|
46
|
-
name: "App Catalog",
|
|
47
|
-
short_name: "EH",
|
|
48
|
-
description: "Jump between environments",
|
|
49
|
-
theme_color: "#1f2937",
|
|
50
|
-
background_color: "#ffffff",
|
|
51
|
-
display: "standalone",
|
|
52
|
-
start_url: "/",
|
|
53
|
-
icons: [
|
|
54
|
-
{
|
|
55
|
-
src: "favicon.ico",
|
|
56
|
-
sizes: "48x48",
|
|
57
|
-
type: "image/x-icon"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
src: "app-catalog-16x16.png",
|
|
61
|
-
sizes: "16x16",
|
|
62
|
-
type: "image/png"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
src: "app-catalog-32x32.png",
|
|
66
|
-
sizes: "32x32",
|
|
67
|
-
type: "image/png"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
src: "app-catalog-48x48.png",
|
|
71
|
-
sizes: "48x48",
|
|
72
|
-
type: "image/png"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
src: "app-catalog-192x192.png",
|
|
76
|
-
sizes: "192x192",
|
|
77
|
-
type: "image/png"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
src: "app-catalog-512x512.png",
|
|
81
|
-
sizes: "512x512",
|
|
82
|
-
type: "image/png"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
src: "app-catalog-square.svg",
|
|
86
|
-
sizes: "150x150",
|
|
87
|
-
type: "image/svg+xml"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
src: "app-catalog-square.svg",
|
|
91
|
-
sizes: "150x150",
|
|
92
|
-
purpose: "maskable",
|
|
93
|
-
type: "image/svg+xml"
|
|
94
|
-
}
|
|
30
|
+
if (((_a = options == null ? void 0 : options.pwa) == null ? void 0 : _a.enabled) !== false) {
|
|
31
|
+
const registerType = ((_b = options == null ? void 0 : options.pwa) == null ? void 0 : _b.registerType) || (process.env["VITE_AUTO_UPDATE"] === "true" ? "autoUpdate" : "prompt");
|
|
32
|
+
const selfDestroying = ((_c = options == null ? void 0 : options.pwa) == null ? void 0 : _c.selfDestroying) !== void 0 ? options.pwa.selfDestroying : process.env["VITE_SELF_DESTROYING"] === "true" ? true : void 0;
|
|
33
|
+
plugins.push(
|
|
34
|
+
VitePWA({
|
|
35
|
+
registerType,
|
|
36
|
+
selfDestroying,
|
|
37
|
+
workbox: {
|
|
38
|
+
globPatterns: ["**/*.{js,css,html,ico,png,svg}"]
|
|
39
|
+
},
|
|
40
|
+
includeAssets: [
|
|
41
|
+
"favicon.ico",
|
|
42
|
+
"apple-touch-180x180.png",
|
|
43
|
+
"app-catalog-*.png",
|
|
44
|
+
"app-catalog-square.svg"
|
|
95
45
|
],
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
46
|
+
manifest: {
|
|
47
|
+
name: "App Catalog",
|
|
48
|
+
short_name: "EH",
|
|
49
|
+
description: "Jump between environments",
|
|
50
|
+
theme_color: "#1f2937",
|
|
51
|
+
background_color: "#ffffff",
|
|
52
|
+
display: "standalone",
|
|
53
|
+
start_url: "/",
|
|
54
|
+
icons: [
|
|
55
|
+
{
|
|
56
|
+
src: "favicon.ico",
|
|
57
|
+
sizes: "48x48",
|
|
58
|
+
type: "image/x-icon"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
src: "app-catalog-16x16.png",
|
|
62
|
+
sizes: "16x16",
|
|
63
|
+
type: "image/png"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
src: "app-catalog-32x32.png",
|
|
67
|
+
sizes: "32x32",
|
|
68
|
+
type: "image/png"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
src: "app-catalog-48x48.png",
|
|
72
|
+
sizes: "48x48",
|
|
73
|
+
type: "image/png"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
src: "app-catalog-192x192.png",
|
|
77
|
+
sizes: "192x192",
|
|
78
|
+
type: "image/png"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
src: "app-catalog-512x512.png",
|
|
82
|
+
sizes: "512x512",
|
|
83
|
+
type: "image/png"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
src: "app-catalog-square.svg",
|
|
87
|
+
sizes: "150x150",
|
|
88
|
+
type: "image/svg+xml"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
src: "app-catalog-square.svg",
|
|
92
|
+
sizes: "150x150",
|
|
93
|
+
purpose: "maskable",
|
|
94
|
+
type: "image/svg+xml"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
...(_d = options == null ? void 0 : options.pwa) == null ? void 0 : _d.manifest
|
|
98
|
+
},
|
|
99
|
+
devOptions: {
|
|
100
|
+
enabled: true
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
}
|
|
103
105
|
plugins.push(svgr());
|
|
104
106
|
plugins.push(viteReact());
|
|
105
107
|
if (process.env["NODE_ENV"] === "test") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontendViteConfig.js","sources":["../../src/frontendViteConfig.ts"],"sourcesContent":["import viteReact from '@vitejs/plugin-react'\nimport * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as process from 'node:process'\nimport type { UserConfig } from 'vite'\nimport type { ManifestOptions } from 'vite-plugin-pwa'\nimport { VitePWA } from 'vite-plugin-pwa'\nimport { viteStaticCopy } from 'vite-plugin-static-copy'\nimport svgr from 'vite-plugin-svgr'\n\nexport function frontendViteConfig(options?: {\n appRoot?: string\n pwa?: {\n manifest?: Partial<ManifestOptions>\n registerType?: 'autoUpdate' | 'prompt'\n selfDestroying?: boolean\n }\n}) {\n const plugins: UserConfig['plugins'] = []\n\n // Set up static copy for public assets if appRoot is provided\n if (options?.appRoot) {\n const appPublicDir = path.join(options.appRoot, 'public')\n\n // Copy core public assets first, then local public assets (local takes precedence)\n plugins.push(\n viteStaticCopy({\n targets: [\n {\n src: 'node_modules/@igstack/app-catalog-frontend-core/public/[!.]*',\n dest: '.',\n },\n ...(fs.existsSync(appPublicDir)\n ? [\n {\n src: 'public/[!.]*',\n dest: '.',\n },\n ]\n : []),\n ],\n }),\n )\n }\n\n //
|
|
1
|
+
{"version":3,"file":"frontendViteConfig.js","sources":["../../src/frontendViteConfig.ts"],"sourcesContent":["import viteReact from '@vitejs/plugin-react'\nimport * as fs from 'node:fs'\nimport * as path from 'node:path'\nimport * as process from 'node:process'\nimport type { UserConfig } from 'vite'\nimport type { ManifestOptions } from 'vite-plugin-pwa'\nimport { VitePWA } from 'vite-plugin-pwa'\nimport { viteStaticCopy } from 'vite-plugin-static-copy'\nimport svgr from 'vite-plugin-svgr'\n\nexport function frontendViteConfig(options?: {\n appRoot?: string\n pwa?: {\n /**\n * Register VitePWA. Set `false` in a consumer that registers its own\n * VitePWA: two registrations both write `sw.js` and\n * `manifest.webmanifest`, and which precache manifest survives is decided\n * by plugin order.\n */\n enabled?: boolean\n manifest?: Partial<ManifestOptions>\n registerType?: 'autoUpdate' | 'prompt'\n selfDestroying?: boolean\n }\n}) {\n const plugins: UserConfig['plugins'] = []\n\n // Set up static copy for public assets if appRoot is provided\n if (options?.appRoot) {\n const appPublicDir = path.join(options.appRoot, 'public')\n\n // Copy core public assets first, then local public assets (local takes precedence)\n plugins.push(\n viteStaticCopy({\n targets: [\n {\n src: 'node_modules/@igstack/app-catalog-frontend-core/public/[!.]*',\n dest: '.',\n },\n ...(fs.existsSync(appPublicDir)\n ? [\n {\n src: 'public/[!.]*',\n dest: '.',\n },\n ]\n : []),\n ],\n }),\n )\n }\n\n // A consumer that registers its own VitePWA passes `pwa.enabled: false`:\n // two registrations write sw.js and manifest.webmanifest twice, and plugin\n // order decides which precache manifest survives.\n if (options?.pwa?.enabled !== false) {\n const registerType =\n options?.pwa?.registerType ||\n (process.env['VITE_AUTO_UPDATE'] === 'true' ? 'autoUpdate' : 'prompt')\n\n const selfDestroying =\n options?.pwa?.selfDestroying !== undefined\n ? options.pwa.selfDestroying\n : process.env['VITE_SELF_DESTROYING'] === 'true'\n ? true\n : undefined\n\n plugins.push(\n VitePWA({\n registerType,\n selfDestroying,\n workbox: {\n globPatterns: ['**/*.{js,css,html,ico,png,svg}'],\n },\n includeAssets: [\n 'favicon.ico',\n 'apple-touch-180x180.png',\n 'app-catalog-*.png',\n 'app-catalog-square.svg',\n ],\n manifest: {\n name: 'App Catalog',\n short_name: 'EH',\n description: 'Jump between environments',\n theme_color: '#1f2937',\n background_color: '#ffffff',\n display: 'standalone',\n start_url: '/',\n icons: [\n {\n src: 'favicon.ico',\n sizes: '48x48',\n type: 'image/x-icon',\n },\n {\n src: 'app-catalog-16x16.png',\n sizes: '16x16',\n type: 'image/png',\n },\n {\n src: 'app-catalog-32x32.png',\n sizes: '32x32',\n type: 'image/png',\n },\n {\n src: 'app-catalog-48x48.png',\n sizes: '48x48',\n type: 'image/png',\n },\n {\n src: 'app-catalog-192x192.png',\n sizes: '192x192',\n type: 'image/png',\n },\n {\n src: 'app-catalog-512x512.png',\n sizes: '512x512',\n type: 'image/png',\n },\n {\n src: 'app-catalog-square.svg',\n sizes: '150x150',\n type: 'image/svg+xml',\n },\n {\n src: 'app-catalog-square.svg',\n sizes: '150x150',\n purpose: 'maskable',\n type: 'image/svg+xml',\n },\n ],\n ...options?.pwa?.manifest,\n },\n devOptions: {\n enabled: true,\n },\n }),\n )\n }\n\n plugins.push(svgr())\n plugins.push(viteReact())\n\n if (process.env['NODE_ENV'] === 'test') {\n plugins.push({\n name: 'load-svg',\n enforce: 'pre',\n transform(_: string, id: string) {\n if (id.endsWith('.svg?react')) {\n return `export default () => \"svg-stub\"`\n }\n return undefined\n },\n })\n }\n\n // plugins.push(tanstackRouter());\n\n return {\n server: {\n port: 4000,\n strictPort: true,\n host: 'localhost',\n proxy: {\n '/api': {\n target: 'http://localhost:4001',\n changeOrigin: true,\n cookieDomainRewrite: 'localhost',\n },\n '/trpc': {\n target: 'http://localhost:4001',\n changeOrigin: true,\n cookieDomainRewrite: 'localhost',\n },\n '/static': {\n target: 'http://localhost:4001',\n changeOrigin: true,\n },\n },\n },\n resolve: {\n // Use 'my-custom-condition' to resolve @igstack/app-catalog-frontend-core to source files\n // This enables HMR when developing the core library alongside the consuming app\n conditions: ['my-custom-condition'],\n },\n publicDir: '.vite-merged-public',\n plugins,\n } satisfies UserConfig\n}\n"],"names":["path"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igstack/app-catalog-frontend-build-vite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha-20260922004708",
|
|
4
4
|
"description": "Vite build config for App Catalog frontend",
|
|
5
5
|
"homepage": "https://github.com/lislon/app-catalog",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"tsx": "^4.19.4",
|
|
46
46
|
"typescript": "5.9.3",
|
|
47
47
|
"vite": "^6.3.5",
|
|
48
|
-
"@igstack/app-catalog-shared-core": "
|
|
48
|
+
"@igstack/app-catalog-shared-core": "5.0.0-alpha-20260922004708"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"vite": "^6.3.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=16"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "69a7311a866a907857f7799acaaf2e6549aa810c",
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "vite build",
|
|
60
60
|
"build:lenient": "vite build --mode lenient",
|
|
@@ -11,6 +11,13 @@ import svgr from 'vite-plugin-svgr'
|
|
|
11
11
|
export function frontendViteConfig(options?: {
|
|
12
12
|
appRoot?: string
|
|
13
13
|
pwa?: {
|
|
14
|
+
/**
|
|
15
|
+
* Register VitePWA. Set `false` in a consumer that registers its own
|
|
16
|
+
* VitePWA: two registrations both write `sw.js` and
|
|
17
|
+
* `manifest.webmanifest`, and which precache manifest survives is decided
|
|
18
|
+
* by plugin order.
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean
|
|
14
21
|
manifest?: Partial<ManifestOptions>
|
|
15
22
|
registerType?: 'autoUpdate' | 'prompt'
|
|
16
23
|
selfDestroying?: boolean
|
|
@@ -43,89 +50,93 @@ export function frontendViteConfig(options?: {
|
|
|
43
50
|
)
|
|
44
51
|
}
|
|
45
52
|
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
// A consumer that registers its own VitePWA passes `pwa.enabled: false`:
|
|
54
|
+
// two registrations write sw.js and manifest.webmanifest twice, and plugin
|
|
55
|
+
// order decides which precache manifest survives.
|
|
56
|
+
if (options?.pwa?.enabled !== false) {
|
|
57
|
+
const registerType =
|
|
58
|
+
options?.pwa?.registerType ||
|
|
59
|
+
(process.env['VITE_AUTO_UPDATE'] === 'true' ? 'autoUpdate' : 'prompt')
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
const selfDestroying =
|
|
62
|
+
options?.pwa?.selfDestroying !== undefined
|
|
63
|
+
? options.pwa.selfDestroying
|
|
64
|
+
: process.env['VITE_SELF_DESTROYING'] === 'true'
|
|
65
|
+
? true
|
|
66
|
+
: undefined
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
],
|
|
71
|
-
manifest: {
|
|
72
|
-
name: 'App Catalog',
|
|
73
|
-
short_name: 'EH',
|
|
74
|
-
description: 'Jump between environments',
|
|
75
|
-
theme_color: '#1f2937',
|
|
76
|
-
background_color: '#ffffff',
|
|
77
|
-
display: 'standalone',
|
|
78
|
-
start_url: '/',
|
|
79
|
-
icons: [
|
|
80
|
-
{
|
|
81
|
-
src: 'favicon.ico',
|
|
82
|
-
sizes: '48x48',
|
|
83
|
-
type: 'image/x-icon',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
src: 'app-catalog-16x16.png',
|
|
87
|
-
sizes: '16x16',
|
|
88
|
-
type: 'image/png',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
src: 'app-catalog-32x32.png',
|
|
92
|
-
sizes: '32x32',
|
|
93
|
-
type: 'image/png',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
src: 'app-catalog-48x48.png',
|
|
97
|
-
sizes: '48x48',
|
|
98
|
-
type: 'image/png',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
src: 'app-catalog-192x192.png',
|
|
102
|
-
sizes: '192x192',
|
|
103
|
-
type: 'image/png',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
src: 'app-catalog-512x512.png',
|
|
107
|
-
sizes: '512x512',
|
|
108
|
-
type: 'image/png',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
src: 'app-catalog-square.svg',
|
|
112
|
-
sizes: '150x150',
|
|
113
|
-
type: 'image/svg+xml',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
src: 'app-catalog-square.svg',
|
|
117
|
-
sizes: '150x150',
|
|
118
|
-
purpose: 'maskable',
|
|
119
|
-
type: 'image/svg+xml',
|
|
120
|
-
},
|
|
68
|
+
plugins.push(
|
|
69
|
+
VitePWA({
|
|
70
|
+
registerType,
|
|
71
|
+
selfDestroying,
|
|
72
|
+
workbox: {
|
|
73
|
+
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
|
74
|
+
},
|
|
75
|
+
includeAssets: [
|
|
76
|
+
'favicon.ico',
|
|
77
|
+
'apple-touch-180x180.png',
|
|
78
|
+
'app-catalog-*.png',
|
|
79
|
+
'app-catalog-square.svg',
|
|
121
80
|
],
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
81
|
+
manifest: {
|
|
82
|
+
name: 'App Catalog',
|
|
83
|
+
short_name: 'EH',
|
|
84
|
+
description: 'Jump between environments',
|
|
85
|
+
theme_color: '#1f2937',
|
|
86
|
+
background_color: '#ffffff',
|
|
87
|
+
display: 'standalone',
|
|
88
|
+
start_url: '/',
|
|
89
|
+
icons: [
|
|
90
|
+
{
|
|
91
|
+
src: 'favicon.ico',
|
|
92
|
+
sizes: '48x48',
|
|
93
|
+
type: 'image/x-icon',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
src: 'app-catalog-16x16.png',
|
|
97
|
+
sizes: '16x16',
|
|
98
|
+
type: 'image/png',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
src: 'app-catalog-32x32.png',
|
|
102
|
+
sizes: '32x32',
|
|
103
|
+
type: 'image/png',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
src: 'app-catalog-48x48.png',
|
|
107
|
+
sizes: '48x48',
|
|
108
|
+
type: 'image/png',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
src: 'app-catalog-192x192.png',
|
|
112
|
+
sizes: '192x192',
|
|
113
|
+
type: 'image/png',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
src: 'app-catalog-512x512.png',
|
|
117
|
+
sizes: '512x512',
|
|
118
|
+
type: 'image/png',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
src: 'app-catalog-square.svg',
|
|
122
|
+
sizes: '150x150',
|
|
123
|
+
type: 'image/svg+xml',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
src: 'app-catalog-square.svg',
|
|
127
|
+
sizes: '150x150',
|
|
128
|
+
purpose: 'maskable',
|
|
129
|
+
type: 'image/svg+xml',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
...options?.pwa?.manifest,
|
|
133
|
+
},
|
|
134
|
+
devOptions: {
|
|
135
|
+
enabled: true,
|
|
136
|
+
},
|
|
137
|
+
}),
|
|
138
|
+
)
|
|
139
|
+
}
|
|
129
140
|
|
|
130
141
|
plugins.push(svgr())
|
|
131
142
|
plugins.push(viteReact())
|