create-bubbles 0.0.17 → 0.0.18
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-react-rsbuild/.env +2 -1
- package/template-react-rsbuild/.env.development +1 -0
- package/template-react-rsbuild/.env.production +1 -0
- package/template-react-rsbuild/package.json +1 -0
- package/template-react-rsbuild/rsbuild.config.ts +2 -0
- package/template-react-rsbuild/src/utils/env.ts +1 -0
- package/template-react-rsbuild/src/utils/request/axios.ts +2 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PUBLIC_API_URL = 'http://localhost:8080'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
PUBLIC_API_URL = 'http://localhost:8080'
|
|
@@ -3,6 +3,7 @@ import { pluginReact } from '@rsbuild/plugin-react'
|
|
|
3
3
|
import AutoImport from 'unplugin-auto-import/rspack'
|
|
4
4
|
import UnoCSS from '@unocss/postcss'
|
|
5
5
|
import { pluginSass } from '@rsbuild/plugin-sass'
|
|
6
|
+
import { pluginSvgr } from '@rsbuild/plugin-svgr'
|
|
6
7
|
|
|
7
8
|
export default defineConfig({
|
|
8
9
|
html: {
|
|
@@ -23,6 +24,7 @@ export default defineConfig({
|
|
|
23
24
|
// additionalData: `@import "@/styles/variables.scss";`,
|
|
24
25
|
},
|
|
25
26
|
}),
|
|
27
|
+
pluginSvgr(),
|
|
26
28
|
],
|
|
27
29
|
tools: {
|
|
28
30
|
rspack: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { message } from 'antd'
|
|
2
2
|
import axios, { type AxiosResponse } from 'axios'
|
|
3
|
+
import { envVariables } from '@/utils/env'
|
|
3
4
|
|
|
4
5
|
import { router } from '@/router'
|
|
5
6
|
import { useUserStore } from '@/store/modules/user'
|
|
@@ -24,7 +25,7 @@ export default (customConfig?: CustomConfig) => {
|
|
|
24
25
|
const token = useUserStore((state) => state.token)
|
|
25
26
|
|
|
26
27
|
const instance = axios.create({
|
|
27
|
-
baseURL:
|
|
28
|
+
baseURL: envVariables.PUBLIC_API_AFFIX,
|
|
28
29
|
})
|
|
29
30
|
|
|
30
31
|
instance.interceptors.request.use(
|