@dcloudio/vue-cli-plugin-uni 2.0.2-alpha-3061620221230002 → 2.0.2-alpha-3061620230106001

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.
Files changed (2) hide show
  1. package/lib/mp/index.js +6 -2
  2. package/package.json +3 -3
package/lib/mp/index.js CHANGED
@@ -76,6 +76,9 @@ function getProvides () {
76
76
  ) { // 非微信小程序,自动注入 wx 对象
77
77
  provides.wx = provides.uni
78
78
  }
79
+ if (process.env.UNI_PLATFORM === 'mp-weixin') {
80
+ provides.wx = [path.resolve(uniPath, '../wx.js'), 'default']
81
+ }
79
82
  return provides
80
83
  }
81
84
 
@@ -144,7 +147,8 @@ function initSubpackageConfig (webpackConfig, vueOptions) {
144
147
  }
145
148
  vueOptions.outputDir = process.env.UNI_OUTPUT_DIR
146
149
  webpackConfig.output.path(process.env.UNI_OUTPUT_DIR)
147
- webpackConfig.output.set(webpack.version[0] > 4 ? 'chunkLoadingGlobal' : 'jsonpFunction', 'webpackJsonp_' + (process.env.UNI_SUBPACKGE || process.env.UNI_MP_PLUGIN))
150
+ webpackConfig.output.set(webpack.version[0] > 4 ? 'chunkLoadingGlobal' : 'jsonpFunction', 'webpackJsonp_' + (process
151
+ .env.UNI_SUBPACKGE || process.env.UNI_MP_PLUGIN))
148
152
  }
149
153
 
150
154
  function addToUniEntry (fileName) {
@@ -357,4 +361,4 @@ ${globalEnv}.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;`
357
361
  webpackConfig.plugins.delete('preload')
358
362
  webpackConfig.plugins.delete('prefetch')
359
363
  }
360
- }
364
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/vue-cli-plugin-uni",
3
- "version": "2.0.2-alpha-3061620221230002",
3
+ "version": "2.0.2-alpha-3061620230106001",
4
4
  "description": "uni-app plugin for vue-cli 3",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  "author": "fxy060608",
18
18
  "license": "Apache-2.0",
19
19
  "dependencies": {
20
- "@dcloudio/uni-stat": "^2.0.2-alpha-3061620221230002",
20
+ "@dcloudio/uni-stat": "^2.0.2-alpha-3061620230106001",
21
21
  "buffer-json": "^2.0.0",
22
22
  "clone-deep": "^4.0.1",
23
23
  "cross-env": "^5.2.0",
@@ -41,5 +41,5 @@
41
41
  "copy-webpack-plugin": ">=5",
42
42
  "postcss": ">=7"
43
43
  },
44
- "gitHead": "690b3fc83398e7490eb538e86afdf46c3523c340"
44
+ "gitHead": "6b29a40ac0b4098965e80322bc52e0013c221e05"
45
45
  }