@live-change/frontend-base 0.2.52 → 0.2.53

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/vite-config.js +138 -123
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/frontend-base",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "scripts": {
5
5
  "memDev": "lcli memDev --enableSessions --initScript ./init.js --templatePath ../../base-frontend/index.html",
6
6
  "localDevInit": "rm tmp.db; lcli localDev --enableSessions --initScript ./init.js",
@@ -30,7 +30,7 @@
30
30
  "@live-change/password-authentication-service": "0.3.29",
31
31
  "@live-change/secret-code-service": "0.3.29",
32
32
  "@live-change/secret-link-service": "0.3.29",
33
- "@live-change/security-frontend": "^0.2.52",
33
+ "@live-change/security-frontend": "^0.2.53",
34
34
  "@live-change/session-service": "0.3.29",
35
35
  "@live-change/user-service": "0.3.29",
36
36
  "@live-change/vue3-components": "0.2.28",
@@ -74,5 +74,5 @@
74
74
  "author": "",
75
75
  "license": "BSD-3-Clause",
76
76
  "description": "",
77
- "gitHead": "7c05ea8ee7cc24e95feeedf86b92b045e78e8dea"
77
+ "gitHead": "55ef49d734bc2bd983010f862648e16aaf680d9f"
78
78
  }
package/vite-config.js CHANGED
@@ -13,135 +13,150 @@ const ssrTransformCustomDir = () => {
13
13
  }
14
14
  }
15
15
 
16
- module.exports = async ({ command, mode }) => ({
17
- define: {
18
- ENV_BASE_HREF: JSON.stringify(process.env.BASE_HREF || 'http://localhost:8001')
19
- },
20
- server: {
21
- hmr: {
22
- port: +(process.env.HMR_PORT ?? (await findFreePorts())[0])
16
+ module.exports = async ({ command, mode }) => {
17
+ console.log("VITE CONFIG", command, mode)
18
+ return {
19
+ define: {
20
+ ENV_BASE_HREF: JSON.stringify(process.env.BASE_HREF || 'http://localhost:8001')
23
21
  },
24
- fs: {
25
- allow: [
26
- searchForWorkspaceRoot(process.cwd()),
27
- path.dirname(require.resolve('primeicons/package.json')),
28
- path.dirname(require.resolve('@fortawesome/fontawesome-free/package.json'))
29
- ]
30
- }
31
- },
32
- plugins: [
33
- vuePlugin({
34
- template: {
35
- compilerOptions: {
36
- // whitespace: "preserve",
37
- directiveTransforms: {
38
- 'ripple': ssrTransformCustomDir,
39
- 'styleclass': ssrTransformCustomDir,
40
- 'badge': ssrTransformCustomDir,
41
- 'shared-element': ssrTransformCustomDir,
42
- 'lazy': ssrTransformCustomDir
22
+ server: {
23
+ hmr: {
24
+ port: +(process.env.HMR_PORT ?? (await findFreePorts())[0])
25
+ },
26
+ fs: {
27
+ allow: [
28
+ searchForWorkspaceRoot(process.cwd()),
29
+ path.dirname(require.resolve('primeicons/package.json')),
30
+ path.dirname(require.resolve('@fortawesome/fontawesome-free/package.json'))
31
+ ]
32
+ }
33
+ },
34
+ plugins: [
35
+ vuePlugin({
36
+ template: {
37
+ compilerOptions: {
38
+ // whitespace: "preserve",
39
+ directiveTransforms: {
40
+ 'ripple': ssrTransformCustomDir,
41
+ 'styleclass': ssrTransformCustomDir,
42
+ 'badge': ssrTransformCustomDir,
43
+ 'shared-element': ssrTransformCustomDir,
44
+ 'lazy': ssrTransformCustomDir
45
+ }
43
46
  }
44
- }
47
+ },
48
+ }),
49
+ viteImages({ extensions: ['jpg', 'jpeg', 'png', 'svg', 'webp'] }),
50
+ viteCompression({ algorithm: 'brotliCompress', ext: '.br' }),
51
+ viteCompression({ algorithm: 'gzip', ext: '.gz' }),
52
+ viteCompression({ algorithm: 'deflate', ext: '.zz' }),
53
+ visualizer({
54
+ filename: '../stats.html'
55
+ }),
56
+ ],
57
+ build: {
58
+ minify: false,
59
+ commonjsOptions: {
60
+ transformMixedEsModules: true,
61
+ include: [
62
+ /node_modules/,
63
+ /live-change-framework\/framework\//,
64
+ /live-change-framework\/relations-plugin\//,
65
+ /live-change-framework\/uid\//,
66
+ /live-change-db\/db-web\//,
67
+ /live-change-db\/db\//,
68
+ /live-change-db\/db-store-rbtree\//,
69
+ /live-change-db\/db-store-indexeddb\//,
70
+ /live-change-db\/db-store-localstorage\//,
71
+ /live-change-dao\/dao\//,
72
+ /live-change-dao\/dao-sockjs\//,
73
+ /live-change-dao\/dao-websocket\//,
74
+ /live-change-dao\/dao-message\//,
75
+ ]
45
76
  },
46
- }),
47
- viteImages({ extensions: ['jpg', 'jpeg', 'png', 'svg', 'webp'] }),
48
- viteCompression({ algorithm: 'brotliCompress', ext: '.br' }),
49
- viteCompression({ algorithm: 'gzip', ext: '.gz' }),
50
- viteCompression({ algorithm: 'deflate', ext: '.zz' }),
51
- visualizer({
52
- filename: '../stats.html'
53
- }),
54
- ],
55
- build: {
56
- minify: false,
57
- commonjsOptions: {
58
- transformMixedEsModules: true,
77
+ },
78
+ ssr: {
79
+ external: [
80
+ ...(command == 'build' ? [
81
+ ]: [
82
+ '@live-change/dao',
83
+ ]),
84
+ '@live-change/uid',
85
+ '@live-change/framework',
86
+ '@live-change/framework/lib/utils/validators.js',
87
+ '@live-change/relations-plugin',
88
+ '@live-change/db-web',
89
+ '@live-change/db',
90
+ '@live-change/db-store-indexeddb',
91
+ '@live-change/db-store-rbtree',
92
+ 'debug',
93
+ 'vite',
94
+ 'pica'
95
+ ],
96
+ noExternal: [
97
+ ...(command == 'build' ? [
98
+ '@live-change/dao',
99
+ ]: [
100
+
101
+ ]),
102
+ '@live-change/vue3-components',
103
+ '@live-change/dao-vue3',
104
+ '@live-change/vue3-ssr',
105
+ '@live-change/email-service',
106
+ '@live-change/password-authentication-service',
107
+ '@live-change/db-admin',
108
+ '@live-change/user-frontend',
109
+ '@live-change/frontend-base',
110
+ '@live-change/frontend-utils',
111
+ '@live-change/access-control-frontend',
112
+ '@live-change/content-frontend',
113
+ '@live-change/blog-frontend',
114
+ '@live-change/image-frontend',
115
+ '@live-change/security-frontend',
116
+ '@live-change/upload-frontend',
117
+ '@live-change/url-frontend',
118
+ '@live-change/user-frontend',
119
+ '@live-change/wysiwyg-frontend',
120
+ 'vue3-scroll-border',
121
+ 'pretty-bytes',
122
+ 'primevue',
123
+ 'primevue/usetoast',
124
+ 'primevue/useconfirm',
125
+ 'primevue/usedialog'
126
+ ]
127
+ },
128
+ optimizeDeps: {
59
129
  include: [
60
- /node_modules/,
61
- /live-change-framework\/framework\//,
62
- /live-change-framework\/relations-plugin\//,
63
- /live-change-framework\/uid\//,
64
- /live-change-db\/db-web\//,
65
- /live-change-db\/db\//,
66
- /live-change-db\/db-store-rbtree\//,
67
- /live-change-db\/db-store-indexeddb\//,
68
- /live-change-db\/db-store-localstorage\//,
69
- /live-change-dao\/dao\//,
70
- /live-change-dao\/dao-sockjs\//,
71
- /live-change-dao\/dao-websocket\//,
72
- /live-change-dao\/dao-message\//,
130
+ '@live-change/dao',
131
+ '@live-change/dao-sockjs',
132
+ '@live-change/dao-websocket',
133
+ '@live-change/dao-message',
134
+ '@live-change/uid',
135
+ '@live-change/framework',
136
+ '@live-change/framework/lib/utils/validators.js',
137
+ '@live-change/relations-plugin',
138
+ '@live-change/db-web',
139
+ '@live-change/db',
140
+ '@live-change/db-store-indexeddb',
141
+ '@live-change/db-store-rbtree',
142
+ 'debug',
143
+ 'pica'
144
+ ],
145
+ exclude: [
146
+ 'primevue',
147
+ 'primevue/usetoast',
148
+ 'primevue/useconfirm',
149
+ 'primevue/usedialog',
73
150
  ]
74
151
  },
75
- },
76
- ssr: {
77
- external: [
78
- '@live-change/dao',
79
- '@live-change/uid',
80
- '@live-change/framework',
81
- '@live-change/framework/lib/utils/validators.js',
82
- '@live-change/relations-plugin',
83
- '@live-change/db-web',
84
- '@live-change/db',
85
- '@live-change/db-store-indexeddb',
86
- '@live-change/db-store-rbtree',
87
- 'debug',
88
- 'vite',
89
- 'pica'
90
- ],
91
- noExternal: [
92
- '@live-change/vue3-components',
93
- '@live-change/dao-vue3',
94
- '@live-change/vue3-ssr',
95
- '@live-change/email-service',
96
- '@live-change/password-authentication-service',
97
- '@live-change/db-admin',
98
- '@live-change/user-frontend',
99
- '@live-change/frontend-base',
100
- '@live-change/frontend-utils',
101
- '@live-change/access-control-frontend',
102
- '@live-change/content-frontend',
103
- '@live-change/blog-frontend',
104
- '@live-change/image-frontend',
105
- '@live-change/security-frontend',
106
- '@live-change/upload-frontend',
107
- '@live-change/url-frontend',
108
- '@live-change/user-frontend',
109
- '@live-change/wysiwyg-frontend',
110
- 'vue3-scroll-border',
111
- 'pretty-bytes'
112
- ]
113
- },
114
- optimizeDeps: {
115
- include: [
116
- '@live-change/dao',
117
- '@live-change/dao-sockjs',
118
- '@live-change/dao-websocket',
119
- '@live-change/dao-message',
120
- '@live-change/uid',
121
- '@live-change/framework',
122
- '@live-change/framework/lib/utils/validators.js',
123
- '@live-change/relations-plugin',
124
- '@live-change/db-web',
125
- '@live-change/db',
126
- '@live-change/db-store-indexeddb',
127
- '@live-change/db-store-rbtree',
128
- 'debug',
129
- 'pica'
130
- ],
131
- exclude: [
132
- 'primevue',
133
- 'primevue/usetoast',
134
- 'primevue/useconfirm',
135
- 'primevue/usedialog',
136
- ]
137
- },
138
152
 
139
- resolve: {
140
- alias: [
141
- { find: 'debug', replacement: 'debug/src/browser.js' },
142
- { find: 'universal-websocket-client', replacement: 'universal-websocket-client/browser.js' },
143
- { find: 'sockjs-client', replacement: 'sockjs-client/dist/sockjs.min.js' }
144
- ],
153
+ resolve: {
154
+ alias: [
155
+ { find: 'debug', replacement: 'debug/src/browser.js' },
156
+ { find: 'universal-websocket-client', replacement: 'universal-websocket-client/browser.js' },
157
+ { find: 'sockjs-client', replacement: 'sockjs-client/dist/sockjs.min.js' }
158
+ ],
159
+ }
145
160
  }
146
- })
161
+ }
147
162