@nocobase/app 2.1.0-beta.33 → 2.1.0-beta.35
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 +4 -2
- package/client-v2/rsbuild.config.ts +8 -2
- package/dist/client/assets/{index-98f7a99f.js → index-7bb4b4a6.js} +344 -277
- package/dist/client/index.html +2 -1
- package/dist/client/index.html.tpl +2 -1
- package/dist/client/v2/assets/5823-183d14b0.js +2 -0
- package/dist/client/v2/assets/{index-84321c96.js → index-d358751d.js} +212 -145
- package/dist/client/v2/index.html +2 -1
- package/package.json +7 -7
- package/dist/client/v2/assets/5823-aa1ccac3.js +0 -2
- /package/dist/client/assets/{index-98f7a99f.js.LICENSE.txt → index-7bb4b4a6.js.LICENSE.txt} +0 -0
- /package/dist/client/v2/assets/{5823-aa1ccac3.js.LICENSE.txt → 5823-183d14b0.js.LICENSE.txt} +0 -0
- /package/dist/client/v2/assets/{index-84321c96.js.LICENSE.txt → index-d358751d.js.LICENSE.txt} +0 -0
package/client/rsbuild.config.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { pluginLess } from '@rsbuild/plugin-less';
|
|
|
15
15
|
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill';
|
|
16
16
|
import { pluginReact } from '@rsbuild/plugin-react';
|
|
17
17
|
import { pluginSvgr } from '@rsbuild/plugin-svgr';
|
|
18
|
-
import { generatePlugins,
|
|
18
|
+
import { generatePlugins, getRsbuildBrowserAlias } from '@nocobase/devtools/rsbuildConfig';
|
|
19
19
|
|
|
20
20
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
21
|
const __dirname = path.dirname(__filename);
|
|
@@ -51,6 +51,7 @@ function createRuntimeHeadScript(appPublicPath: string, isBuild: boolean) {
|
|
|
51
51
|
return [
|
|
52
52
|
`window['__nocobase_public_path__'] = ${JSON.stringify(appPublicPath)};`,
|
|
53
53
|
`window['__nocobase_dev_public_path__'] = "/";`,
|
|
54
|
+
`window['__nocobase_app_dev__'] = ${JSON.stringify(process.env.NOCOBASE_APP_DEV === 'true')};`,
|
|
54
55
|
`window['__esm_cdn_base_url__'] = ${JSON.stringify(process.env.ESM_CDN_BASE_URL || '')};`,
|
|
55
56
|
`window['__esm_cdn_suffix__'] = ${JSON.stringify(process.env.ESM_CDN_SUFFIX || '')};`,
|
|
56
57
|
].join('\n');
|
|
@@ -65,6 +66,7 @@ function createRuntimeHeadScript(appPublicPath: string, isBuild: boolean) {
|
|
|
65
66
|
`window['__nocobase_api_client_share_token__'] = {{env.API_CLIENT_SHARE_TOKEN}};`,
|
|
66
67
|
`window['__nocobase_ws_url__'] = '{{env.WS_URL}}';`,
|
|
67
68
|
`window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';`,
|
|
69
|
+
`window['__nocobase_app_dev__'] = {{env.NOCOBASE_APP_DEV}};`,
|
|
68
70
|
`window['__esm_cdn_base_url__'] = '{{env.ESM_CDN_BASE_URL}}';`,
|
|
69
71
|
`window['__esm_cdn_suffix__'] = '{{env.ESM_CDN_SUFFIX}}';`,
|
|
70
72
|
].join('\n');
|
|
@@ -104,7 +106,7 @@ export default defineConfig(({ command }) => {
|
|
|
104
106
|
const proxyTargetUrl = process.env.PROXY_TARGET_URL || `http://127.0.0.1:${clientPort + 1}`;
|
|
105
107
|
const hmrClientHost = process.env.RSPACK_HMR_CLIENT_HOST;
|
|
106
108
|
const hmrClientPort = toNumber(process.env.RSPACK_HMR_CLIENT_PORT, clientPort);
|
|
107
|
-
const workspaceAliases =
|
|
109
|
+
const workspaceAliases = getRsbuildBrowserAlias();
|
|
108
110
|
|
|
109
111
|
return {
|
|
110
112
|
plugins: [pluginReact(), pluginLess(), pluginNodePolyfill(), pluginSvgr()],
|
|
@@ -14,7 +14,7 @@ import { pluginLess } from '@rsbuild/plugin-less';
|
|
|
14
14
|
import { pluginNodePolyfill } from '@rsbuild/plugin-node-polyfill';
|
|
15
15
|
import { pluginReact } from '@rsbuild/plugin-react';
|
|
16
16
|
import { pluginSvgr } from '@rsbuild/plugin-svgr';
|
|
17
|
-
import { generateV2Plugins,
|
|
17
|
+
import { generateV2Plugins, getRsbuildBrowserAlias } from '@nocobase/devtools/rsbuildConfig';
|
|
18
18
|
|
|
19
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
20
20
|
const __dirname = path.dirname(__filename);
|
|
@@ -41,6 +41,9 @@ function createRuntimeHeadScript(v2PublicPath: string, isBuild: boolean) {
|
|
|
41
41
|
if (!isBuild) {
|
|
42
42
|
return [
|
|
43
43
|
`window['__nocobase_public_path__'] = window['__nocobase_public_path__'] || ${JSON.stringify(v2PublicPath)};`,
|
|
44
|
+
`window['__nocobase_app_dev__'] = window['__nocobase_app_dev__'] || ${JSON.stringify(
|
|
45
|
+
process.env.NOCOBASE_APP_DEV === 'true',
|
|
46
|
+
)};`,
|
|
44
47
|
`window['__esm_cdn_base_url__'] = window['__esm_cdn_base_url__'] || ${JSON.stringify(
|
|
45
48
|
process.env.ESM_CDN_BASE_URL || 'https://esm.sh',
|
|
46
49
|
)};`,
|
|
@@ -68,6 +71,9 @@ function createRuntimeHeadScript(v2PublicPath: string, isBuild: boolean) {
|
|
|
68
71
|
process.env.WEBSOCKET_URL || '',
|
|
69
72
|
)};`,
|
|
70
73
|
`window['__nocobase_ws_path__'] = window['__nocobase_ws_path__'] || ${JSON.stringify(process.env.WS_PATH || '')};`,
|
|
74
|
+
`window['__nocobase_app_dev__'] = window['__nocobase_app_dev__'] || ${JSON.stringify(
|
|
75
|
+
process.env.NOCOBASE_APP_DEV === 'true',
|
|
76
|
+
)};`,
|
|
71
77
|
`window['__esm_cdn_base_url__'] = window['__esm_cdn_base_url__'] || ${JSON.stringify(
|
|
72
78
|
process.env.ESM_CDN_BASE_URL || 'https://esm.sh',
|
|
73
79
|
)};`,
|
|
@@ -105,7 +111,7 @@ export default defineConfig(({ command }) => {
|
|
|
105
111
|
const hmrClientHost = process.env.RSPACK_HMR_CLIENT_HOST;
|
|
106
112
|
const hmrClientPort = toNumber(process.env.RSPACK_HMR_CLIENT_PORT || process.env.APP_PORT, v2Port);
|
|
107
113
|
const proxyTargetUrl = process.env.PROXY_TARGET_URL || `http://127.0.0.1:${process.env.APP_PORT || 13001}`;
|
|
108
|
-
const workspaceAliases =
|
|
114
|
+
const workspaceAliases = getRsbuildBrowserAlias();
|
|
109
115
|
|
|
110
116
|
return {
|
|
111
117
|
plugins: [pluginReact(), pluginLess(), pluginNodePolyfill(), pluginSvgr()],
|