@web-widget/vue2 0.10.1 → 0.10.3
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/vite.cjs +9 -5
- package/dist/vite.js +9 -5
- package/dist/vue2.client.js +2 -1
- package/package.json +1 -1
package/dist/vite.cjs
CHANGED
|
@@ -41,10 +41,7 @@ __export(vite_exports, {
|
|
|
41
41
|
});
|
|
42
42
|
module.exports = __toCommonJS(vite_exports);
|
|
43
43
|
var import_vite = require("@web-widget/vite");
|
|
44
|
-
var VUE_INTERNAL_REQUEST =
|
|
45
|
-
function toArray(value) {
|
|
46
|
-
return Array.isArray(value) ? value : value ? [value] : [];
|
|
47
|
-
}
|
|
44
|
+
var VUE_INTERNAL_REQUEST = /.*\.vue\?vue\b.*$/;
|
|
48
45
|
function vue2WebWidgetPlugin({
|
|
49
46
|
provide = "@web-widget/vue2",
|
|
50
47
|
export: exportWidget = {},
|
|
@@ -61,7 +58,14 @@ function vue2WebWidgetPlugin({
|
|
|
61
58
|
include: /(?:\.|@)widget\..*$/,
|
|
62
59
|
includeImporter: /.*\.vue(?:\?.*)?$/
|
|
63
60
|
}, importWidget), {
|
|
64
|
-
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST]
|
|
61
|
+
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST],
|
|
62
|
+
excludeImporter: [
|
|
63
|
+
...toArray(importWidget.excludeImporter),
|
|
64
|
+
VUE_INTERNAL_REQUEST
|
|
65
|
+
]
|
|
65
66
|
})
|
|
66
67
|
});
|
|
67
68
|
}
|
|
69
|
+
function toArray(value) {
|
|
70
|
+
return Array.isArray(value) ? value : value ? [value] : [];
|
|
71
|
+
}
|
package/dist/vite.js
CHANGED
|
@@ -20,10 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
|
|
21
21
|
// src/vite.ts
|
|
22
22
|
import { webWidgetPlugin } from "@web-widget/vite";
|
|
23
|
-
var VUE_INTERNAL_REQUEST =
|
|
24
|
-
function toArray(value) {
|
|
25
|
-
return Array.isArray(value) ? value : value ? [value] : [];
|
|
26
|
-
}
|
|
23
|
+
var VUE_INTERNAL_REQUEST = /.*\.vue\?vue\b.*$/;
|
|
27
24
|
function vue2WebWidgetPlugin({
|
|
28
25
|
provide = "@web-widget/vue2",
|
|
29
26
|
export: exportWidget = {},
|
|
@@ -40,10 +37,17 @@ function vue2WebWidgetPlugin({
|
|
|
40
37
|
include: /(?:\.|@)widget\..*$/,
|
|
41
38
|
includeImporter: /.*\.vue(?:\?.*)?$/
|
|
42
39
|
}, importWidget), {
|
|
43
|
-
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST]
|
|
40
|
+
exclude: [...toArray(importWidget.exclude), VUE_INTERNAL_REQUEST],
|
|
41
|
+
excludeImporter: [
|
|
42
|
+
...toArray(importWidget.excludeImporter),
|
|
43
|
+
VUE_INTERNAL_REQUEST
|
|
44
|
+
]
|
|
44
45
|
})
|
|
45
46
|
});
|
|
46
47
|
}
|
|
48
|
+
function toArray(value) {
|
|
49
|
+
return Array.isArray(value) ? value : value ? [value] : [];
|
|
50
|
+
}
|
|
47
51
|
export {
|
|
48
52
|
vue2WebWidgetPlugin as default
|
|
49
53
|
};
|
package/dist/vue2.client.js
CHANGED
|
@@ -128,7 +128,7 @@ var createVueRender = ({
|
|
|
128
128
|
const ssrRoot = container.querySelector(vue2ssrAttrSelector) || container.firstElementChild;
|
|
129
129
|
const state = container.querySelector(
|
|
130
130
|
"script[as=state]"
|
|
131
|
-
);
|
|
131
|
+
) || null;
|
|
132
132
|
const stateContent = state ? JSON.parse(state.textContent) : onPrefetchData ? await onPrefetchData(context, component, props) : void 0;
|
|
133
133
|
if (!ssrRoot) {
|
|
134
134
|
throw new Error(
|
|
@@ -137,6 +137,7 @@ var createVueRender = ({
|
|
|
137
137
|
}
|
|
138
138
|
element = ssrRoot;
|
|
139
139
|
mergedProps = stateContent ? Object.assign(stateContent, props) : props;
|
|
140
|
+
state == null ? void 0 : state.remove();
|
|
140
141
|
}
|
|
141
142
|
app = new Vue(__spreadValues({
|
|
142
143
|
render(h2) {
|