diff --git a/build/rollup.config.web-view.js b/build/rollup.config.web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..25e9c089a5152d7a2e47e38e1ff6fa421ede16f7 --- /dev/null +++ b/build/rollup.config.web-view.js @@ -0,0 +1,23 @@ +const path = require('path') +const babel = require('rollup-plugin-babel') +const alias = require('rollup-plugin-alias') +const uglify = require('rollup-plugin-uglify') +module.exports = { + input: 'src/core/runtime/web-view/index.js', + output: { + name: 'uni', + file: `dist/uni.webview.1.5.2.js`, + format: 'umd' + }, + plugins: [ + alias({ + 'uni-platforms': path.resolve(__dirname, '../src/platforms') + }), + babel(), + uglify.uglify({ + output: { + ascii_only: true + } + }) + ] +} diff --git a/dist/uni.webview.1.5.2.js b/dist/uni.webview.1.5.2.js new file mode 100644 index 0000000000000000000000000000000000000000..40ad9921f62576c1ea009d9c8f9d650cf7d915b5 --- /dev/null +++ b/dist/uni.webview.1.5.2.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,function(){"use strict";function i(e,n){var i={options:{timestamp:+new Date},name:e,arg:n};if(!window.plus)return window.parent.postMessage({type:s,data:i,pageId:""},"*");if(0===d.length){var t=plus.webview.currentWebview();if(!t)throw new Error("plus.webview.currentWebview() is undefined");var o=t.parent(),a="";a=o?o.id:t.id,d.push(a)}var r=JSON.stringify(i);plus.webview.getWebviewById(u)?plus.webview.postMessageToUniNView({type:s,args:{data:i,webviewIds:d}},u):plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(s,'",').concat(r,",").concat(JSON.stringify(d),");"))}var d=[],u="__uniapp__service",s="WEB_INVOKE_APPSERVICE",n={navigateTo:function(e){var n=(0 { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/uni-mp-alipay/dist/index.js b/packages/uni-mp-alipay/dist/index.js index 9623222660086cb64bdb124755898ca90e955ce9..04a8b2c12a23f81b6cf83efa62df3bc95c2f22a6 100644 --- a/packages/uni-mp-alipay/dist/index.js +++ b/packages/uni-mp-alipay/dist/index.js @@ -1526,10 +1526,10 @@ const hooks = [ function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store; - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store; + } Vue.prototype.mpHost = "mp-alipay"; @@ -1570,8 +1570,8 @@ function parseBaseApp (vm, { app: this }; - this.$vm.$scope = this; - // vm 上也挂载 globalData + this.$vm.$scope = this; + // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; @@ -1583,6 +1583,13 @@ function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods; + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/uni-mp-baidu/dist/index.js b/packages/uni-mp-baidu/dist/index.js index 2fc951f0e3a64cc5deea77df29a3286dcd999bed..0c9b08114438ec09df5fe61010ea3f7fa71ced9c 100644 --- a/packages/uni-mp-baidu/dist/index.js +++ b/packages/uni-mp-baidu/dist/index.js @@ -1271,10 +1271,10 @@ const hooks = [ function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store; - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store; + } Vue.prototype.mpHost = "mp-baidu"; @@ -1315,8 +1315,8 @@ function parseBaseApp (vm, { app: this }; - this.$vm.$scope = this; - // vm 上也挂载 globalData + this.$vm.$scope = this; + // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; @@ -1328,6 +1328,13 @@ function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods; + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/uni-mp-qq/dist/index.js b/packages/uni-mp-qq/dist/index.js index c6f4f3891b5c4c7c04fdbf26d18a8733329657ee..b10069a29b393bfb75e1d51ed9da3c90fe8cd9f7 100644 --- a/packages/uni-mp-qq/dist/index.js +++ b/packages/uni-mp-qq/dist/index.js @@ -1189,10 +1189,10 @@ const hooks = [ function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store; - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store; + } Vue.prototype.mpHost = "mp-qq"; @@ -1238,8 +1238,8 @@ function parseBaseApp (vm, { app: this }; - this.$vm.$scope = this; - // vm 上也挂载 globalData + this.$vm.$scope = this; + // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; @@ -1251,6 +1251,13 @@ function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods; + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/uni-mp-toutiao/dist/index.js b/packages/uni-mp-toutiao/dist/index.js index f49790397da4a227848856d5e993cef9446ff3b5..44399726a4f689a2690226e1bccfb2092039c847 100644 --- a/packages/uni-mp-toutiao/dist/index.js +++ b/packages/uni-mp-toutiao/dist/index.js @@ -1281,10 +1281,10 @@ const hooks = [ function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store; - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store; + } Vue.prototype.mpHost = "mp-toutiao"; @@ -1325,8 +1325,8 @@ function parseBaseApp (vm, { app: this }; - this.$vm.$scope = this; - // vm 上也挂载 globalData + this.$vm.$scope = this; + // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; @@ -1338,6 +1338,13 @@ function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods; + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 7450184b97b40985caea79c4f1e7d2bfcb2f72c9..50d5177c0b9314968f8209cb3234357d72597f00 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -1129,10 +1129,10 @@ const hooks = [ function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store; - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store; + } Vue.prototype.mpHost = "mp-weixin"; @@ -1178,8 +1178,8 @@ function parseBaseApp (vm, { app: this }; - this.$vm.$scope = this; - // vm 上也挂载 globalData + this.$vm.$scope = this; + // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; @@ -1191,6 +1191,13 @@ function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods; + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name]; + }); + } initHooks(appOptions, hooks); diff --git a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js index 80b6ce559fed6e4c516277cf26e844375acb5945..27a344cf8cc0674d62972e1cd25e01f76b252471 100644 --- a/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js +++ b/packages/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/template.js @@ -1,7 +1,67 @@ +const path = require('path') + +const { + removeExt, + normalizePath, + getPagesJson +} = require('@dcloudio/uni-cli-shared') + +const { + normalizeNodeModules +} = require('@dcloudio/webpack-uni-mp-loader/lib/shared') + +const SCROLLER_COMPONENTS = [ + 'list', + 'scroller', + 'scroll-view', + 'waterfall' +] + module.exports = function(content) { this.cacheable && this.cacheable() - if (content.indexOf('recycle-list') === -1) { - return `${content}` + const source = content.trim() + + if (SCROLLER_COMPONENTS.find(name => source.indexOf('<' + name) === 0)) { + return content } - return content + if (source.indexOf(' + resourcePath = normalizeNodeModules( + removeExt(normalizePath(path.relative(process.env.UNI_INPUT_DIR, this._module.issuer.issuer.resource))) + ) + } + + if (!process.UNI_NVUE_ENTRY[resourcePath]) { + return content + } + // 暂时实时读取配置信息,查找是否 disableScroll + const appJson = getPagesJson() + if (!appJson.nvue || !appJson.nvue.pages) { + return content + } + const pagePath = resourcePath + '.html' + const pageJson = appJson.nvue.pages.find(page => page.path === pagePath) + if (!pageJson) { + return content + } + Object.assign(appJson.globalStyle, appJson.globalStyle['app-plus'] || {}) + Object.assign(pageJson.style, pageJson.style['app-plus'] || {}) + const pageJsonStyle = Object.assign(appJson.globalStyle, pageJson.style) + if (pageJsonStyle.disableScroll === true) { + return content + } + + return `${content}` } diff --git a/src/core/runtime/web-view/index.js b/src/core/runtime/web-view/index.js new file mode 100644 index 0000000000000000000000000000000000000000..67dc70a289a12f7b79d89b6cc828a80d87ce0352 --- /dev/null +++ b/src/core/runtime/web-view/index.js @@ -0,0 +1,63 @@ +import { + initWebviewApi as initAppplusWebviewApi +} from 'uni-platforms/app-plus/runtime/web-view' +import { + initWebviewApi as initH5WebviewApi +} from 'uni-platforms/h5/runtime/web-view' +import { + initWebviewApi as initAlipayWebviewApi +} from 'uni-platforms/mp-alipay/runtime/web-view' +import { + initWebviewApi as initBaiduWebviewApi +} from 'uni-platforms/mp-baidu/runtime/web-view' +import { + initWebviewApi as initQQWebviewApi +} from 'uni-platforms/mp-qq/runtime/web-view' +import { + initWebviewApi as initToutiaoWebviewApi +} from 'uni-platforms/mp-toutiao/runtime/web-view' +import { + initWebviewApi as initWeixinWebviewApi +} from 'uni-platforms/mp-weixin/runtime/web-view' + +const UniAppJSBridgeReady = function () { + window.UniAppJSBridge = true + document.dispatchEvent(new CustomEvent('UniAppJSBridgeReady', { + bubbles: true, + cancelable: true + })) +} + +const initWebviewApis = [ + initAppplusWebviewApi, + initWeixinWebviewApi, + initQQWebviewApi, + initAlipayWebviewApi, + initBaiduWebviewApi, + initToutiaoWebviewApi, + initH5WebviewApi +] + +let webViewApi +for (let i = 0; i < initWebviewApis.length; i++) { + webViewApi = initWebviewApis[i](UniAppJSBridgeReady) + if (webViewApi) { + break + } +} + +if (!webViewApi) { + webViewApi = {} +} + +const api = typeof uni !== 'undefined' ? uni : {} + +if (api.navigateTo) { + api.miniProgram = webViewApi +} else { + Object.assign(api, webViewApi, { + miniProgram: webViewApi + }) +} + +export default api diff --git a/src/platforms/app-plus/runtime/web-view-api.js b/src/platforms/app-plus/runtime/web-view-api.js new file mode 100644 index 0000000000000000000000000000000000000000..d036960f07dae5fa29f31918246364f0b78a80d6 --- /dev/null +++ b/src/platforms/app-plus/runtime/web-view-api.js @@ -0,0 +1,104 @@ +const webviewIds = [] + +const UNIAPP_SERVICE_NVUE_ID = '__uniapp__service' +const WEB_INVOKE_APPSERVICE = 'WEB_INVOKE_APPSERVICE' + +const publish = function (method, params) { + const paramsObj = { + options: { + timestamp: +new Date() + }, + name: method, + arg: params + } + if (!window.plus) { // h5 + return window.parent.postMessage({ + type: WEB_INVOKE_APPSERVICE, + data: paramsObj, + pageId: '' + }, '*') + } + // app-plus + if (webviewIds.length === 0) { + const currentWebview = plus.webview.currentWebview() + if (!currentWebview) { + throw new Error('plus.webview.currentWebview() is undefined') + } + const parentWebview = currentWebview.parent() + let webviewId = '' + if (!parentWebview) { + webviewId = currentWebview.id + // throw new Error('plus.webview.currentWebview().parent() is undefined') + } else { + webviewId = parentWebview.id + } + webviewIds.push(webviewId) + } + const paramsString = JSON.stringify(paramsObj) + if (plus.webview.getWebviewById(UNIAPP_SERVICE_NVUE_ID)) { + plus.webview.postMessageToUniNView({ + type: WEB_INVOKE_APPSERVICE, + args: { + data: paramsObj, + webviewIds + } + }, UNIAPP_SERVICE_NVUE_ID) + } else { + plus.webview.getLaunchWebview().evalJS( + `UniPlusBridge.subscribeHandler("${WEB_INVOKE_APPSERVICE}",${paramsString},${JSON.stringify(webviewIds)});` + ) + } +} + +export default { + navigateTo ({ + url + } = {}) { + publish('navigateTo', { + url: encodeURI(url) + }) + }, + navigateBack ({ + delta + } = {}) { + publish('navigateBack', { + delta: parseInt(delta) || 1 + }) + }, + switchTab ({ + url + } = {}) { + publish('switchTab', { + url: encodeURI(url) + }) + }, + reLaunch ({ + url + } = {}) { + publish('reLaunch', { + url: encodeURI(url) + }) + }, + redirectTo ({ + url + } = {}) { + publish('redirectTo', { + url: encodeURI(url) + }) + }, + getEnv (callback) { + /* eslint-disable standard/no-callback-literal */ + if (window.plus) { + callback({ + plus: true + }) + } else { + callback({ + h5: true + }) + } + }, + postMessage (params = {}) { + publish('postMessage', params.data || {}) + } +} diff --git a/src/platforms/app-plus/runtime/web-view.js b/src/platforms/app-plus/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..068b2a725db4101ef8d48753a8729f8183b0fa3e --- /dev/null +++ b/src/platforms/app-plus/runtime/web-view.js @@ -0,0 +1,19 @@ +import api from './web-view-api' + +const isAppPlus = /uni-app/i.test(navigator.userAgent) + +const readyRE = /complete|loaded|interactive/ + +export function initWebviewApi (readyCallback) { + if (!isAppPlus) { + return + } + setTimeout(() => { + if (window.plus && readyRE.test(document.readyState)) { + readyCallback() + } else { + document.addEventListener('plusready', readyCallback) + } + }, 0) + return api +} diff --git a/src/platforms/h5/runtime/web-view.js b/src/platforms/h5/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..85f50dbe431f9c854ba9952f061dc47eefca7c16 --- /dev/null +++ b/src/platforms/h5/runtime/web-view.js @@ -0,0 +1,8 @@ +import api from '../../app-plus/runtime/web-view-api' + +export function initWebviewApi (readyCallback) { + setTimeout(() => { + document.addEventListener('DOMContentLoaded', readyCallback) + }, 0) + return api +} diff --git a/src/platforms/mp-alipay/runtime/web-view.js b/src/platforms/mp-alipay/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..a5cf43e1843c77d04003c536ed069b49389a5342 --- /dev/null +++ b/src/platforms/mp-alipay/runtime/web-view.js @@ -0,0 +1,28 @@ +const isAlipay = window.my && navigator.userAgent.indexOf('AlipayClient') > -1 + +export function initWebviewApi (readyCallback) { + if (!isAlipay) { + return + } + setTimeout(() => { + document.addEventListener('DOMContentLoaded', readyCallback) + }, 0) + const { + navigateTo, + navigateBack, + switchTab, + reLaunch, + redirectTo, + postMessage, + getEnv + } = window.my + return { + navigateTo, + navigateBack, + switchTab, + reLaunch, + redirectTo, + postMessage, + getEnv + } +} diff --git a/src/platforms/mp-baidu/runtime/web-view.js b/src/platforms/mp-baidu/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..8a15af4e3829332111526b855ca621767d448f1b --- /dev/null +++ b/src/platforms/mp-baidu/runtime/web-view.js @@ -0,0 +1,13 @@ +const isBaidu = window.swan && + window.swan.webView && + /swan-baiduboxapp/i.test(navigator.userAgent) + +export function initWebviewApi (readyCallback) { + if (!isBaidu) { + return + } + setTimeout(() => { + document.addEventListener('DOMContentLoaded', readyCallback) + }, 0) + return window.swan.webView +} diff --git a/src/platforms/mp-qq/runtime/web-view.js b/src/platforms/mp-qq/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..2794f88f237aa3452a9e4bdc2c45c2fa1bb0760f --- /dev/null +++ b/src/platforms/mp-qq/runtime/web-view.js @@ -0,0 +1,18 @@ +const isQQ = window.qq && + window.qq.miniProgram && + /QQ/i.test(navigator.userAgent) && + /miniProgram/i.test(navigator.userAgent) + +export function initWebviewApi (readyCallback) { + if (!isQQ) { + return + } + setTimeout(() => { + if (window.QQJSBridge && window.QQJSBridge.invoke) { + readyCallback() + } else { + document.addEventListener('QQJSBridgeReady', readyCallback) + } + }, 0) + return window.qq.miniProgram +} diff --git a/src/platforms/mp-toutiao/runtime/web-view.js b/src/platforms/mp-toutiao/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..45092fc18976175da663fc8852ff56158fb45ece --- /dev/null +++ b/src/platforms/mp-toutiao/runtime/web-view.js @@ -0,0 +1,13 @@ +const isToutiao = window.tt && + window.tt.miniProgram && + /toutiaomicroapp/i.test(navigator.userAgent) + +export function initWebviewApi (readyCallback) { + if (!isToutiao) { + return + } + setTimeout(() => { + document.addEventListener('DOMContentLoaded', readyCallback) + }, 0) + return window.tt.miniProgram +} diff --git a/src/platforms/mp-weixin/runtime/web-view.js b/src/platforms/mp-weixin/runtime/web-view.js new file mode 100644 index 0000000000000000000000000000000000000000..f96217ac73c6f210ee52104e3ed7784fab4b8b1c --- /dev/null +++ b/src/platforms/mp-weixin/runtime/web-view.js @@ -0,0 +1,18 @@ +const isWeixin = window.wx && + window.wx.miniProgram && + /micromessenger/i.test(navigator.userAgent) && + /miniProgram/i.test(navigator.userAgent) + +export function initWebviewApi (readyCallback) { + if (!isWeixin) { + return + } + setTimeout(() => { + if (window.WeixinJSBridge && window.WeixinJSBridge.invoke) { + readyCallback() + } else { + document.addEventListener('WeixinJSBridgeReady', readyCallback) + } + }, 0) + return window.wx.miniProgram +} diff --git a/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js b/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js index 2a05720f1a1dd017d40b82c5c1b40d361adb57a4..f0fea7f2879fa9b3b5964b77264f96c250572c7f 100644 --- a/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js +++ b/src/platforms/mp-weixin/runtime/wrapper/app-base-parser.js @@ -15,10 +15,10 @@ const hooks = [ export default function parseBaseApp (vm, { mocks, initRefs -}) { - if (vm.$options.store) { - Vue.prototype.$store = vm.$options.store - } +}) { + if (vm.$options.store) { + Vue.prototype.$store = vm.$options.store + } Vue.prototype.mpHost = __PLATFORM__ @@ -64,8 +64,8 @@ export default function parseBaseApp (vm, { app: this } - this.$vm.$scope = this - // vm 上也挂载 globalData + this.$vm.$scope = this + // vm 上也挂载 globalData this.$vm.globalData = this.globalData this.$vm._isMounted = true @@ -77,6 +77,13 @@ export default function parseBaseApp (vm, { // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {} + // 将 methods 中的方法挂在 getApp() 中 + const methods = vm.$options.methods + if (methods) { + Object.keys(methods).forEach(name => { + appOptions[name] = methods[name] + }) + } initHooks(appOptions, hooks) diff --git a/yarn.lock b/yarn.lock index 7558be0d20c66975b0bc2564e2ccf2d27668426d..df5a5cf2b00584bc255939f6e892c6530ed8a2fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2496,6 +2496,10 @@ commander@~2.19.0: version "2.19.0" resolved "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" +commander@~2.20.3: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -5403,7 +5407,7 @@ jest-watcher@^24.9.0: jest-util "^24.9.0" string-length "^2.0.0" -jest-worker@^24.6.0, jest-worker@^24.9.0: +jest-worker@^24.0.0, jest-worker@^24.6.0, jest-worker@^24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/jest-worker/download/jest-worker-24.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-worker%2Fdownload%2Fjest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" dependencies: @@ -7683,6 +7687,13 @@ rollup-plugin-alias@^1.4.0: dependencies: slash "^3.0.0" +rollup-plugin-babel@^4.3.3: + version "4.3.3" + resolved "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz#7eb5ac16d9b5831c3fd5d97e8df77ba25c72a2aa" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + rollup-pluginutils "^2.8.1" + rollup-plugin-commonjs@^10.0.1: version "10.0.1" resolved "https://registry.npm.taobao.org/rollup-plugin-commonjs/download/rollup-plugin-commonjs-10.0.1.tgz#fbfcadf4ce2e826068e056a9f5c19287d9744ddf" @@ -7710,6 +7721,15 @@ rollup-plugin-replace@^2.1.0: magic-string "^0.25.2" rollup-pluginutils "^2.6.0" +rollup-plugin-uglify@^6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.3.tgz#e3f776171344b580bec6c6ab8888622b67099457" + dependencies: + "@babel/code-frame" "^7.0.0" + jest-worker "^24.0.0" + serialize-javascript "^1.9.0" + uglify-js "^3.4.9" + rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1: version "2.8.1" resolved "https://registry.npm.taobao.org/rollup-pluginutils/download/rollup-pluginutils-2.8.1.tgz#8fa6dd0697344938ef26c2c09d2488ce9e33ce97" @@ -7865,6 +7885,10 @@ serialize-javascript@^1.4.0, serialize-javascript@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/serialize-javascript/download/serialize-javascript-1.7.0.tgz#d6e0dfb2a3832a8c94468e6eb1db97e55a192a65" +serialize-javascript@^1.9.0: + version "1.9.1" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz#cfc200aef77b600c47da9bb8149c943e798c2fdb" + serve-index@^1.9.1: version "1.9.1" resolved "https://registry.npm.taobao.org/serve-index/download/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" @@ -8660,6 +8684,13 @@ uglify-js@^3.1.4: commander "~2.20.0" source-map "~0.6.1" +uglify-js@^3.4.9: + version "3.6.9" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz#85d353edb6ddfb62a9d798f36e91792249320611" + dependencies: + commander "~2.20.3" + source-map "~0.6.1" + unc-path-regex@^0.1.0: version "0.1.2" resolved "https://registry.npm.taobao.org/unc-path-regex/download/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"