@nocobase/app 2.3.0-beta.15 → 2.3.0-beta.17
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-0cebc21c.js → index-5b80e096.js} +7 -7
- 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/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-9439cb84.js → index-0f79c557.js} +6 -6
- 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/v/assets/8276-8ca2081b.js +0 -1
- package/dist/client/v/assets/runtime-7b1e59d5.js +0 -1
- /package/dist/client/assets/{index-0cebc21c.js.LICENSE.txt → index-5b80e096.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/v/assets/{1739-b7e18697.js.LICENSE.txt → 1739-c8bebcfa.js.LICENSE.txt} +0 -0
- /package/dist/client/v/assets/{index-9439cb84.js.LICENSE.txt → index-0f79c557.js.LICENSE.txt} +0 -0
package/client/rsbuild.config.ts
CHANGED
|
@@ -57,7 +57,7 @@ function createRuntimeHeadScript(appPublicPath: string, isBuild: boolean) {
|
|
|
57
57
|
`window['__nocobase_public_path__'] = ${JSON.stringify(appPublicPath)};`,
|
|
58
58
|
`window['__nocobase_modern_client_prefix__'] = ${JSON.stringify(modernClientPrefix)};`,
|
|
59
59
|
`window['__nocobase_app_client_entry_mode__'] = ${JSON.stringify(appClientEntryMode)};`,
|
|
60
|
-
`window['__nocobase_dev_public_path__'] =
|
|
60
|
+
`window['__nocobase_dev_public_path__'] = ${JSON.stringify(appPublicPath)};`,
|
|
61
61
|
`window['__nocobase_app_dev__'] = ${JSON.stringify(process.env.NOCOBASE_APP_DEV === 'true')};`,
|
|
62
62
|
`window['__esm_cdn_base_url__'] = ${JSON.stringify(process.env.ESM_CDN_BASE_URL || '')};`,
|
|
63
63
|
`window['__esm_cdn_suffix__'] = ${JSON.stringify(process.env.ESM_CDN_SUFFIX || '')};`,
|
|
@@ -103,7 +103,6 @@ export default defineConfig(({ command }) => {
|
|
|
103
103
|
const isDev = !isBuild;
|
|
104
104
|
const resolvedAppPublicPath = ensurePublicPath(process.env.APP_PUBLIC_PATH, '/');
|
|
105
105
|
const appPublicPath = isBuild ? APP_PUBLIC_PATH_TEMPLATE : resolvedAppPublicPath;
|
|
106
|
-
const htmlPublicPath = isDev ? '/' : appPublicPath;
|
|
107
106
|
const apiBasePath = ensurePublicPath(process.env.API_BASE_PATH, '/api/');
|
|
108
107
|
const fileBasePath = ensurePublicPath(`${resolvedAppPublicPath}files/`, '/files/');
|
|
109
108
|
const localStorageBasePath = ensurePublicPath(`${resolvedAppPublicPath}storage/uploads/`, '/storage/uploads/');
|
|
@@ -148,7 +147,7 @@ export default defineConfig(({ command }) => {
|
|
|
148
147
|
tag: 'link',
|
|
149
148
|
attrs: {
|
|
150
149
|
rel: 'stylesheet',
|
|
151
|
-
href: `${
|
|
150
|
+
href: `${appPublicPath}global.css`,
|
|
152
151
|
},
|
|
153
152
|
publicPath: false,
|
|
154
153
|
head: true,
|
|
@@ -163,7 +162,7 @@ export default defineConfig(({ command }) => {
|
|
|
163
162
|
{
|
|
164
163
|
tag: 'script',
|
|
165
164
|
attrs: {
|
|
166
|
-
src: `${
|
|
165
|
+
src: `${appPublicPath}browser-checker.js?v=1`,
|
|
167
166
|
},
|
|
168
167
|
publicPath: false,
|
|
169
168
|
head: true,
|
|
@@ -313,8 +313,13 @@ export default defineConfig(({ command }) => {
|
|
|
313
313
|
middlewares.unshift((req, res, next) => {
|
|
314
314
|
const [rawPathname = '/', query = ''] = String(req.url || '/').split('?');
|
|
315
315
|
const pathname = normalizePathname(rawPathname);
|
|
316
|
+
// Strip APP_PUBLIC_PATH first so `/nocobase/admin` maps to `/nocobase/v/admin` instead of
|
|
317
|
+
// `/nocobase/v/nocobase/admin`, and `/nocobase/index.html` is still treated as a document entry.
|
|
318
|
+
const relativePath = isWithinBasePath(pathname, appPublicPath)
|
|
319
|
+
? normalizePathname(pathname.slice(normalizePathname(appPublicPath).length))
|
|
320
|
+
: pathname;
|
|
316
321
|
if (
|
|
317
|
-
!isClientDocumentEntryPath(
|
|
322
|
+
!isClientDocumentEntryPath(relativePath) ||
|
|
318
323
|
pathname.startsWith('/.well-known/') ||
|
|
319
324
|
pathname.startsWith(apiBasePath) ||
|
|
320
325
|
pathname.startsWith(wsBasePath) ||
|
|
@@ -325,7 +330,7 @@ export default defineConfig(({ command }) => {
|
|
|
325
330
|
return;
|
|
326
331
|
}
|
|
327
332
|
if (!isWithinBasePath(pathname, v2PublicPath)) {
|
|
328
|
-
const target =
|
|
333
|
+
const target = relativePath === '/' ? v2PublicPath : `${v2PublicPath.replace(/\/$/, '')}${relativePath}`;
|
|
329
334
|
res.statusCode = 302;
|
|
330
335
|
res.setHeader('Location', `${target}${query ? `?${query}` : ''}`);
|
|
331
336
|
res.end();
|