From a1506caa6173861a33c00f768fc5d97a630d93e9 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 6 Sep 2019 00:57:02 +0800 Subject: [PATCH] fix(nuve): vuex --- packages/uni-app-plus-nvue/dist/index.js | 8 ++++---- .../vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/uni-app-plus-nvue/dist/index.js b/packages/uni-app-plus-nvue/dist/index.js index 4573934c7..56f43d327 100644 --- a/packages/uni-app-plus-nvue/dist/index.js +++ b/packages/uni-app-plus-nvue/dist/index.js @@ -218,7 +218,7 @@ var serviceContext = (function () { function getRealPath (filePath) { const SCHEME_RE = /^([a-z-]+:)?\/\//i; - const BASE64_RE = /^data:[a-z-]+\/[a-z-]+;base64,/; + const DATA_RE = /^data:.*,.*/; // 无协议的情况补全 https if (filePath.indexOf('//') === 0) { @@ -226,7 +226,7 @@ var serviceContext = (function () { } // 网络资源或base64 - if (SCHEME_RE.test(filePath) || BASE64_RE.test(filePath)) { + if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath)) { return filePath } @@ -2471,7 +2471,7 @@ var serviceContext = (function () { } const SCHEME_RE = /^([a-z-]+:)?\/\//i; - const BASE64_RE = /^data:[a-z-]+\/[a-z-]+;base64,/; + const DATA_RE = /^data:.*,.*/; function addBase (filePath) { return filePath @@ -2486,7 +2486,7 @@ var serviceContext = (function () { } } // 网络资源或base64 - if (SCHEME_RE.test(filePath) || BASE64_RE.test(filePath) || filePath.indexOf('blob:') === 0) { + if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf('blob:') === 0) { return filePath } diff --git a/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js b/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js index ddd6c15f7..4e032f5d5 100644 --- a/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js +++ b/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js @@ -205,7 +205,8 @@ module.exports = function () { }) }, modules: [ - 'node_modules', + 'node_modules', + path.resolve(process.env.UNI_CLI_CONTEXT, 'node_modules'), path.resolve(process.env.UNI_INPUT_DIR, 'node_modules') ] }, -- GitLab