@nocobase/app 2.4.0-alpha.10 → 2.4.0-alpha.12
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/client/rsbuild.config.ts +3 -4
- package/client-v2/rsbuild.config.ts +7 -2
- package/dist/client/assets/{index-236a005c.js → index-694db869.js} +214 -214
- package/dist/client/assets/vendor-math-template-e17cfefc.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/settings/assets/3185-2ced88ab.js +1 -0
- package/dist/client/settings/assets/{8133-1b75eeca.js → 8133-d915ba4e.js} +2 -2
- package/dist/client/settings/assets/{index-af8da099.js → index-e94eabc2.js} +46 -46
- package/dist/client/settings/assets/{runtime-3f8b2449.js → runtime-febd4efe.js} +1 -1
- package/dist/client/settings/index.html +1 -1
- package/dist/client/v/assets/{1739-b7e18697.js → 1739-c8bebcfa.js} +2 -2
- package/dist/client/v/assets/3185-31347352.js +1 -0
- package/dist/client/v/assets/{index-4dd9fa81.js → index-4a4437ff.js} +36 -36
- package/dist/client/v/assets/runtime-b63a8c6b.js +1 -0
- package/dist/client/v/index.html +1 -1
- package/package.json +7 -7
- package/dist/client/assets/vendor-math-template-920c8243.js +0 -2
- package/dist/client/settings/assets/8276-b3dfc452.js +0 -1
- package/dist/client/v/assets/8276-8ca2081b.js +0 -1
- package/dist/client/v/assets/runtime-7b1e59d5.js +0 -1
- /package/dist/client/assets/{index-236a005c.js.LICENSE.txt → index-694db869.js.LICENSE.txt} +0 -0
- /package/dist/client/assets/{vendor-math-template-920c8243.js.LICENSE.txt → vendor-math-template-e17cfefc.js.LICENSE.txt} +0 -0
- /package/dist/client/settings/assets/{8133-1b75eeca.js.LICENSE.txt → 8133-d915ba4e.js.LICENSE.txt} +0 -0
- /package/dist/client/settings/assets/{index-af8da099.js.LICENSE.txt → index-e94eabc2.js.LICENSE.txt} +0 -0
- /package/dist/client/v/assets/{1739-b7e18697.js.LICENSE.txt → 1739-c8bebcfa.js.LICENSE.txt} +0 -0
- /package/dist/client/v/assets/{index-4dd9fa81.js.LICENSE.txt → index-4a4437ff.js.LICENSE.txt} +0 -0
package/client/rsbuild.config.ts
CHANGED
|
@@ -67,7 +67,7 @@ function createRuntimeHeadScript(appPublicPath: string, isBuild: boolean) {
|
|
|
67
67
|
`window['__nocobase_public_path__'] = ${JSON.stringify(appPublicPath)};`,
|
|
68
68
|
`window['__nocobase_modern_client_prefix__'] = ${JSON.stringify(modernClientPrefix)};`,
|
|
69
69
|
`window['__nocobase_app_client_entry_mode__'] = ${JSON.stringify(appClientEntryMode)};`,
|
|
70
|
-
`window['__nocobase_dev_public_path__'] =
|
|
70
|
+
`window['__nocobase_dev_public_path__'] = ${JSON.stringify(appPublicPath)};`,
|
|
71
71
|
`window['__nocobase_app_dev__'] = ${JSON.stringify(process.env.NOCOBASE_APP_DEV === 'true')};`,
|
|
72
72
|
`window['__esm_cdn_base_url__'] = ${JSON.stringify(process.env.ESM_CDN_BASE_URL || '')};`,
|
|
73
73
|
`window['__esm_cdn_suffix__'] = ${JSON.stringify(process.env.ESM_CDN_SUFFIX || '')};`,
|
|
@@ -113,7 +113,6 @@ export default defineConfig(({ command }) => {
|
|
|
113
113
|
const isDev = !isBuild;
|
|
114
114
|
const resolvedAppPublicPath = ensurePublicPath(process.env.APP_PUBLIC_PATH, '/');
|
|
115
115
|
const appPublicPath = isBuild ? APP_PUBLIC_PATH_TEMPLATE : resolvedAppPublicPath;
|
|
116
|
-
const htmlPublicPath = isDev ? '/' : appPublicPath;
|
|
117
116
|
const apiBasePath = ensurePublicPath(process.env.API_BASE_PATH, '/api/');
|
|
118
117
|
const fileBasePath = ensurePublicPath(`${resolvedAppPublicPath}files/`, '/files/');
|
|
119
118
|
const localStorageBasePath = ensurePublicPath(`${resolvedAppPublicPath}storage/uploads/`, '/storage/uploads/');
|
|
@@ -157,7 +156,7 @@ export default defineConfig(({ command }) => {
|
|
|
157
156
|
tag: 'link',
|
|
158
157
|
attrs: {
|
|
159
158
|
rel: 'stylesheet',
|
|
160
|
-
href: `${
|
|
159
|
+
href: `${appPublicPath}global.css`,
|
|
161
160
|
},
|
|
162
161
|
publicPath: false,
|
|
163
162
|
head: true,
|
|
@@ -172,7 +171,7 @@ export default defineConfig(({ command }) => {
|
|
|
172
171
|
{
|
|
173
172
|
tag: 'script',
|
|
174
173
|
attrs: {
|
|
175
|
-
src: `${
|
|
174
|
+
src: `${appPublicPath}browser-checker.js?v=1`,
|
|
176
175
|
},
|
|
177
176
|
publicPath: false,
|
|
178
177
|
head: true,
|
|
@@ -335,8 +335,13 @@ export default defineConfig(({ command }) => {
|
|
|
335
335
|
}
|
|
336
336
|
const [rawPathname = '/', query = ''] = String(req.url || '/').split('?');
|
|
337
337
|
const pathname = normalizePathname(rawPathname);
|
|
338
|
+
// Strip APP_PUBLIC_PATH first so `/nocobase/admin` maps to `/nocobase/v/admin` instead of
|
|
339
|
+
// `/nocobase/v/nocobase/admin`, and `/nocobase/index.html` is still treated as a document entry.
|
|
340
|
+
const relativePath = isWithinBasePath(pathname, appPublicPath)
|
|
341
|
+
? normalizePathname(pathname.slice(normalizePathname(appPublicPath).length))
|
|
342
|
+
: pathname;
|
|
338
343
|
if (
|
|
339
|
-
!isClientDocumentEntryPath(
|
|
344
|
+
!isClientDocumentEntryPath(relativePath) ||
|
|
340
345
|
pathname.startsWith('/.well-known/') ||
|
|
341
346
|
pathname.startsWith(apiBasePath) ||
|
|
342
347
|
pathname.startsWith(wsBasePath) ||
|
|
@@ -349,7 +354,7 @@ export default defineConfig(({ command }) => {
|
|
|
349
354
|
return;
|
|
350
355
|
}
|
|
351
356
|
if (!isWithinBasePath(pathname, v2PublicPath)) {
|
|
352
|
-
const target =
|
|
357
|
+
const target = relativePath === '/' ? v2PublicPath : `${v2PublicPath.replace(/\/$/, '')}${relativePath}`;
|
|
353
358
|
res.statusCode = 302;
|
|
354
359
|
res.setHeader('Location', `${target}${query ? `?${query}` : ''}`);
|
|
355
360
|
res.end();
|