vue 3.2.36 → 3.2.39

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/vue.cjs.js CHANGED
@@ -48,11 +48,15 @@ function compileToFunction(template, options) {
48
48
  // by the server, the template should not contain any user data.
49
49
  template = el ? el.innerHTML : ``;
50
50
  }
51
- const { code } = compilerDom.compile(template, shared.extend({
51
+ const opts = shared.extend({
52
52
  hoistStatic: true,
53
53
  onError: onError ,
54
54
  onWarn: e => onError(e, true)
55
- }, options));
55
+ }, options);
56
+ if (!opts.isCustomElement && typeof customElements !== 'undefined') {
57
+ opts.isCustomElement = tag => !!customElements.get(tag);
58
+ }
59
+ const { code } = compilerDom.compile(template, opts);
56
60
  function onError(err, asWarning = false) {
57
61
  const message = asWarning
58
62
  ? err.message
@@ -44,11 +44,15 @@ function compileToFunction(template, options) {
44
44
  // by the server, the template should not contain any user data.
45
45
  template = el ? el.innerHTML : ``;
46
46
  }
47
- const { code } = compilerDom.compile(template, shared.extend({
47
+ const opts = shared.extend({
48
48
  hoistStatic: true,
49
49
  onError: undefined,
50
50
  onWarn: shared.NOOP
51
- }, options));
51
+ }, options);
52
+ if (!opts.isCustomElement && typeof customElements !== 'undefined') {
53
+ opts.isCustomElement = tag => !!customElements.get(tag);
54
+ }
55
+ const { code } = compilerDom.compile(template, opts);
52
56
  // The wildcard import results in a huge object with every export
53
57
  // with keys that cannot be mangled, and can be quite heavy size-wise.
54
58
  // In the global build we know `Vue` is available globally so we can avoid