mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix: unify component name detection
This commit is contained in:
parent
3bd2bf7cf7
commit
6479a91928
@ -4,7 +4,7 @@ import MagicString from 'magic-string'
|
|||||||
import { isVue } from '../../core/utils'
|
import { isVue } from '../../core/utils'
|
||||||
|
|
||||||
export const DelayedHydrationPlugin = (options: { sourcemap: boolean }) => createUnplugin(() => {
|
export const DelayedHydrationPlugin = (options: { sourcemap: boolean }) => createUnplugin(() => {
|
||||||
const DELAYED_HYDRATION_RE = /<(?:Lazy([A-Z]\w*)|lazy-([\w-]+))\b([^>]+)hydrate:(\w+)(="([^"]+)")?([ />])([^>]*(?:(?<=\/)|>[\s\S]+?<\/Lazy[A-Z]\w*|lazy-[\w-]+))>/g
|
const DELAYED_HYDRATION_RE = /<(?:Lazy|lazy-)([A-Z]\w*|[\w-]+)\b([^>]+)hydrate:(\w+)(="([^"]+)")?([ />])([^>]*(?:(?<=\/)|>[\s\S]+?<\/Lazy[A-Z]\w*|lazy-[\w-]+))>/g
|
||||||
const types = new Map([['time', 'Time'], ['promise', 'Promise'], ['if', 'If'], ['event', 'Event'], ['visible', 'Visible'], ['media', 'Media'], ['never', 'Never'], ['idle', 'Idle']])
|
const types = new Map([['time', 'Time'], ['promise', 'Promise'], ['if', 'If'], ['event', 'Event'], ['visible', 'Visible'], ['media', 'Media'], ['never', 'Never'], ['idle', 'Idle']])
|
||||||
const correctVals = new Map([['time', 'number'], ['promise', 'Promise'], ['event', 'string | string[]'], ['visible', 'IntersectionObserverInit'], ['media', 'string'], ['idle', 'number']])
|
const correctVals = new Map([['time', 'number'], ['promise', 'Promise'], ['event', 'string | string[]'], ['visible', 'IntersectionObserverInit'], ['media', 'string'], ['idle', 'number']])
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user