create-packer 1.25.31 → 1.25.32

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.25.31",
3
+ "version": "1.25.32",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -10,6 +10,7 @@ import { createChunks } from './scripts'
10
10
  // https://vitejs.dev/config/
11
11
  export default defineConfig(({ mode }) => {
12
12
  const env = loadEnv(mode, process.cwd(), '')
13
+ const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
13
14
  const plugins: any[] = [
14
15
  svgr(),
15
16
  checker({
@@ -64,10 +65,10 @@ export default defineConfig(({ mode }) => {
64
65
  server: {
65
66
  host: '0.0.0.0',
66
67
  proxy: {
67
- '/dev/api': {
68
+ [proxyBaseUrl]: {
68
69
  target: 'http://127.0.0.1',
69
70
  changeOrigin: true,
70
- rewrite: path => path.replace(/^\/dev\/api/, '')
71
+ rewrite: path => path.replace(proxyBaseUrl, '')
71
72
  }
72
73
  }
73
74
  }
@@ -11,6 +11,7 @@ import { createChunks } from './scripts'
11
11
  // https://vitejs.dev/config/
12
12
  export default defineConfig(({ mode }) => {
13
13
  const env = loadEnv(mode, process.cwd(), '')
14
+ const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
14
15
  const plugins: any[] = [
15
16
  vueJsx({
16
17
  enableObjectSlots: false
@@ -71,10 +72,10 @@ export default defineConfig(({ mode }) => {
71
72
  server: {
72
73
  host: '0.0.0.0',
73
74
  proxy: {
74
- '/dev/api': {
75
+ [proxyBaseUrl]: {
75
76
  target: 'http://127.0.0.1',
76
77
  changeOrigin: true,
77
- rewrite: path => path.replace(/^\/dev\/api/, '')
78
+ rewrite: path => path.replace(proxyBaseUrl, '')
78
79
  }
79
80
  }
80
81
  }
@@ -1,22 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.travis.yml
19
- !.gitignore
20
- !.gitattributes
21
- !coverage-map.js
22
- !index.js
@@ -1,22 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.travis.yml
19
- !.gitignore
20
- !.gitattributes
21
- !coverage-map.js
22
- !index.js
@@ -1,22 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.travis.yml
19
- !.gitignore
20
- !.gitattributes
21
- !coverage-map.js
22
- !index.js
@@ -1,24 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.github/
19
- !.travis.yml
20
- !.gitignore
21
- !.gitattributes
22
- !coverage-map.js
23
- !map.js
24
- !index.js
@@ -1,24 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.github/
19
- !.travis.yml
20
- !.gitignore
21
- !.gitattributes
22
- !coverage-map.js
23
- !map.js
24
- !index.js
@@ -1,24 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.github/
19
- !.travis.yml
20
- !.gitignore
21
- !.gitattributes
22
- !coverage-map.js
23
- !map.js
24
- !index.js
@@ -1,24 +0,0 @@
1
- # ignore most things, include some others
2
- /*
3
- /.*
4
-
5
- !bin/
6
- !lib/
7
- !docs/
8
- !package.json
9
- !package-lock.json
10
- !README.md
11
- !CONTRIBUTING.md
12
- !LICENSE
13
- !CHANGELOG.md
14
- !example/
15
- !scripts/
16
- !tap-snapshots/
17
- !test/
18
- !.github/
19
- !.travis.yml
20
- !.gitignore
21
- !.gitattributes
22
- !coverage-map.js
23
- !map.js
24
- !index.js