File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change
1
+ # [ 2.9.0] ( https://github.com/anncwb/vite-plugin-mock/compare/v2.5.0...v2.9.0 ) (2021-07-05)
2
+
3
+ ### Bug Fixes
4
+
5
+ - ensure that the post with parameters are matched,fix [ #29 ] ( https://github.com/anncwb/vite-plugin-mock/issues/29 ) ([ 4cb55f8] ( https://github.com/anncwb/vite-plugin-mock/commit/4cb55f87def1e3edf07937ce48b0cfc594f2b88d ) )
6
+ - improve path matching logic, fix [ #25 ] ( https://github.com/anncwb/vite-plugin-mock/issues/25 ) ([ 5079e4b] ( https://github.com/anncwb/vite-plugin-mock/commit/5079e4ba1c713aaba2facc87dfb289ea0916c231 ) )
7
+ - loss request headers in PROD mode ([ #23 ] ( https://github.com/anncwb/vite-plugin-mock/issues/23 ) ) ([ 76302df] ( https://github.com/anncwb/vite-plugin-mock/commit/76302df9cc5a23fe0ccd001787bffbb4c012cc83 ) ), closes [ #15 ] ( https://github.com/anncwb/vite-plugin-mock/issues/15 )
8
+ - make sure ignore matches the file correctly ([ b612a09] ( https://github.com/anncwb/vite-plugin-mock/commit/b612a0934b7dcaae423450a56139cc9b9749c43e ) )
9
+ - support node12 ([ fdfed60] ( https://github.com/anncwb/vite-plugin-mock/commit/fdfed60b6d8859bdcf8292c30859101f47d758b5 ) )
10
+
11
+ ### Features
12
+
13
+ - remove supportTs, change to automatic judgment ([ 4625e59] ( https://github.com/anncwb/vite-plugin-mock/commit/4625e59429b4fc06ff4f911d681ee4999661c3ec ) )
14
+ - response return url ([ #27 ] ( https://github.com/anncwb/vite-plugin-mock/issues/27 ) ) ([ de9ed27] ( https://github.com/anncwb/vite-plugin-mock/commit/de9ed276b61c18cdfe0509df21921bc3ddf9d767 ) )
15
+
16
+ ### Reverts
17
+
18
+ - revert 2.5.0, fix [ #22 ] ( https://github.com/anncwb/vite-plugin-mock/issues/22 ) ([ d5ac0d6] ( https://github.com/anncwb/vite-plugin-mock/commit/d5ac0d68a67f4e4cc568ef1eff12f2ba425553e8 ) )
19
+
1
20
# [ 2.8.0] ( https://github.com/anncwb/vite-plugin-mock/compare/v2.5.0...v2.8.0 ) (2021-06-16)
2
21
3
22
### Bug Fixes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vite-plugin-mock" ,
3
- "version" : " 2.8.1-beta.5 " ,
3
+ "version" : " 2.9.0 " ,
4
4
"description" : " A mock plugin for vite" ,
5
5
"main" : " dist/index.js" ,
6
6
"files" : [
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export function viteMockServe(opt: ViteMockOptions): Plugin {
22
22
if ( ! fileExists ( defaultPath ) ) {
23
23
defaultPath = getDefaultPath ( false ) ;
24
24
if ( ! fileExists ( defaultPath ) ) {
25
- throw new Error ( 'vite-plugin-vue-mock need to set the entry file.' ) ;
25
+ defaultPath = '' ;
26
26
}
27
27
}
28
28
@@ -53,7 +53,7 @@ export function viteMockServe(opt: ViteMockOptions): Plugin {
53
53
} ,
54
54
55
55
async transform ( code : string , id : string ) {
56
- if ( isDev || ! id . endsWith ( injectFile ) ) {
56
+ if ( isDev || ! injectFile || ! id . endsWith ( injectFile ) ) {
57
57
return null ;
58
58
}
59
59
You can’t perform that action at this time.
0 commit comments