@nocobase/app 1.6.0-alpha.9 → 1.6.0-beta.10
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/.umirc.ts +7 -4
- package/client/public/browser-checker.js +10 -0
- package/dist/client/9034.91477d39.async.js +73 -0
- package/dist/client/browser-checker.js +10 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.html.tpl +2 -2
- package/dist/client/npm._at_formulajs.0bdd8ac2.async.js +1 -0
- package/dist/client/p__index.48d5c122.async.js +1581 -0
- package/dist/client/{umi.b571bd41.js → umi.4ecf55e1.js} +2 -2
- package/package.json +6 -6
- package/dist/client/5415.623fa605.async.js +0 -73
- package/dist/client/npm._at_formulajs.ff63776b.async.js +0 -1
- package/dist/client/p__index.87a35e5c.async.js +0 -1590
package/client/.umirc.ts
CHANGED
|
@@ -20,12 +20,12 @@ export default defineConfig({
|
|
|
20
20
|
metas: [{ name: 'viewport', content: 'initial-scale=0.1' }],
|
|
21
21
|
links: [{ rel: 'stylesheet', href: `${appPublicPath}global.css` }],
|
|
22
22
|
headScripts: [
|
|
23
|
-
{
|
|
24
|
-
src: `${appPublicPath}browser-checker.js`,
|
|
25
|
-
},
|
|
26
23
|
{
|
|
27
24
|
content: isDevCmd
|
|
28
|
-
?
|
|
25
|
+
? `
|
|
26
|
+
window['__nocobase_public_path__'] = "${process.env.APP_PUBLIC_PATH || '/'}";
|
|
27
|
+
window['__nocobase_dev_public_path__'] = "/";
|
|
28
|
+
`
|
|
29
29
|
: `
|
|
30
30
|
window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
|
31
31
|
window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
|
@@ -36,6 +36,9 @@ export default defineConfig({
|
|
|
36
36
|
window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
|
|
37
37
|
`,
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
src: `${appPublicPath}browser-checker.js?v=1`,
|
|
41
|
+
},
|
|
39
42
|
],
|
|
40
43
|
cacheDirectoryPath: process.env.APP_CLIENT_CACHE_DIR || `node_modules/.cache`,
|
|
41
44
|
outputPath: path.resolve(__dirname, '../dist/client'),
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
const basename = window['__nocobase_public_path__'] || '/';
|
|
2
|
+
let currentPath = window.location.pathname;
|
|
3
|
+
if (currentPath === basename.slice(0, -1)) {
|
|
4
|
+
const newUrl = `${window.location.origin}${basename}${window.location.search}${window.location.hash}`;
|
|
5
|
+
window.location.replace(newUrl);
|
|
6
|
+
} else if (!currentPath.startsWith(basename)) {
|
|
7
|
+
let newPath = basename + (currentPath.startsWith('/') ? currentPath.slice(1) : currentPath);
|
|
8
|
+
let newUrl = window.location.origin + newPath + window.location.search + window.location.hash;
|
|
9
|
+
window.location.replace(newUrl);
|
|
10
|
+
}
|
|
1
11
|
showLog = true;
|
|
2
12
|
function log(m) {
|
|
3
13
|
if (window.console && showLog) {
|