@tarojs/plugin-http 3.6.2-canary.0 → 3.6.2-canary.1
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/dist/runtime.js +2 -2
- package/package.json +4 -4
- package/src/runtime/index.ts +3 -3
package/dist/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseUrl, Events, window, document } from '@tarojs/runtime';
|
|
2
2
|
export { document } from '@tarojs/runtime';
|
|
3
|
+
import { isString, isFunction, isWebPlatform } from '@tarojs/shared';
|
|
3
4
|
import { setStorage, getStorageSync, request } from '@tarojs/taro';
|
|
4
|
-
import { isString, isFunction } from '@tarojs/shared';
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
@@ -625,7 +625,7 @@ XMLHttpRequest.HEADERS_RECEIVED = 2;
|
|
|
625
625
|
XMLHttpRequest.LOADING = 3;
|
|
626
626
|
XMLHttpRequest.DONE = 4;
|
|
627
627
|
|
|
628
|
-
if (
|
|
628
|
+
if (!isWebPlatform()) {
|
|
629
629
|
if (ENABLE_COOKIE) {
|
|
630
630
|
const _cookie = createCookieInstance();
|
|
631
631
|
Object.defineProperties(document, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-http",
|
|
3
|
-
"version": "3.6.2-canary.
|
|
3
|
+
"version": "3.6.2-canary.1",
|
|
4
4
|
"description": "Taro 小程序端支持使用 web 请求 的插件",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/NervJS/taro#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tarojs/
|
|
27
|
-
"@tarojs/
|
|
28
|
-
"@tarojs/
|
|
26
|
+
"@tarojs/service": "3.6.2-canary.1",
|
|
27
|
+
"@tarojs/shared": "3.6.2-canary.1",
|
|
28
|
+
"@tarojs/runtime": "3.6.2-canary.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@rollup/plugin-json": "^4.1.0",
|
package/src/runtime/index.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { document, window } from '@tarojs/runtime'
|
|
2
|
+
import { isWebPlatform } from '@tarojs/shared'
|
|
2
3
|
|
|
3
4
|
import { Cookie, createCookieInstance } from './Cookie'
|
|
4
5
|
import { XMLHttpRequest } from './XMLHttpRequest'
|
|
5
6
|
|
|
6
7
|
declare const ENABLE_COOKIE: boolean
|
|
7
8
|
|
|
8
|
-
if (
|
|
9
|
-
|
|
9
|
+
if (!isWebPlatform()) {
|
|
10
10
|
if (ENABLE_COOKIE) {
|
|
11
|
-
|
|
12
11
|
const _cookie = createCookieInstance()
|
|
13
12
|
|
|
14
13
|
Object.defineProperties(document, {
|
|
@@ -32,4 +31,5 @@ if (process.env.TARO_ENV !== 'h5') {
|
|
|
32
31
|
|
|
33
32
|
window.XMLHttpRequest = XMLHttpRequest
|
|
34
33
|
}
|
|
34
|
+
|
|
35
35
|
export { Cookie, document, XMLHttpRequest }
|