create-packer 1.24.39 → 1.24.41
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/package.json +1 -1
- package/template/web-app/react-webpack/.env +2 -2
- package/template/web-app/react-webpack/.env.dev +2 -2
- package/template/web-app/react-webpack/global.d.ts +2 -2
- package/template/web-app/react-webpack/providers/request.ts +2 -2
- package/template/web-app/react-webpack/router/router.provider.ts +1 -1
- package/template/web-app/react-webpack/router/router.tsx +1 -1
- package/template/web-app/react-webpack/webpack.config.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
ENV_BASE_URL=/
|
|
2
|
+
ENV_API_HOST=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
ENV_BASE_URL=/dev
|
|
2
|
+
ENV_API_HOST=/api
|
|
@@ -16,7 +16,7 @@ export function genRouteUrl(id: routeType['id'], query?: Record<string, any>) {
|
|
|
16
16
|
const path = getRoute(id, 'path')
|
|
17
17
|
if (path) {
|
|
18
18
|
const { origin } = window.location
|
|
19
|
-
let url = origin +
|
|
19
|
+
let url = origin + ENV_BASE_URL + path
|
|
20
20
|
url += query ? `?${stringify(query)}` : ''
|
|
21
21
|
return url
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@ function getEnvConfig(mode, isProd) {
|
|
|
29
29
|
export default function (env) {
|
|
30
30
|
const isProd = ['prod', 'analyse'].includes(env.mode)
|
|
31
31
|
const envConfig = getEnvConfig(env.mode, isProd)
|
|
32
|
-
const publicPath = JSON.parse(envConfig.
|
|
32
|
+
const publicPath = JSON.parse(envConfig.ENV_BASE_URL)
|
|
33
33
|
|
|
34
34
|
return {
|
|
35
35
|
entry: {
|