packages/compiler-sfc/src/style/pluginScoped.ts
<<<<<<< SEARCH
  const shortId = id.replace(/^data-v-/, '')
=======
  if (!id) {
    return { postcssPlugin: 'vue-sfc-scoped' }
  }
  const shortId = id.replace(/^data-v-/, '')
>>>>>>> REPLACE
packages/compiler-sfc/src/style/pluginScoped.ts
<<<<<<< SEARCH
    OnceExit(root) {
      if (Object.keys(keyframes).length) {
=======
    OnceExit(root) {
      const conditionalAtRules = new Set([
        'media',
        'supports',
        'container',
        'layer',
      ])
      const targets: { atRule: any; enclosing: any }[] = []
      root.walkAtRules(atRule => {
        if (
          !conditionalAtRules.has(atRule.name.toLowerCase()) ||
          !atRule.nodes ||
          !atRule.nodes.some(node => node.type === 'decl')
        ) {
          return
        }
        let enclosing: any = null
        let blocked = false
        let parent: any = atRule.parent
        while (parent) {
          if (
            parent.type === 'atrule' &&
            (/-?keyframes$/.test(parent.name) ||
              (!enclosing &&
                (parent.name.toLowerCase() === 'scope' ||
                  parent.name.toLowerCase() === 'starting-style')))
          ) {
            blocked = true
          }
          if (!enclosing && parent.type === 'rule') {
            enclosing = parent
          }
          parent = parent.parent
        }
        if (enclosing && !blocked) {
          targets.push({ atRule, enclosing })
        }
      })
      targets.forEach(({ atRule, enclosing }) => {
        let run: any[] = []
        const flush = (): void => {
          if (!run.some(node => node.type === 'decl')) {
            run = []
            return
          }
          const first = run[0]
          const wrapper: any = new enclosing.constructor({
            selector: '&',
            raws: {
              before: first.raws.before || ' ',
              between: ' ',
              after: ' ',
              semicolon: true,
            },
          })
          atRule.insertBefore(first, wrapper)
          run.forEach(node => wrapper.append(node))
          run = []
        }
        const children = [...atRule.nodes]
        children.forEach((child: any) => {
          if (
            child.type === 'decl' ||
            (child.type === 'comment' && run.length)
          ) {
            run.push(child)
          } else if (child.type !== 'comment') {
            flush()
          }
        })
        flush()
      })
      if (Object.keys(keyframes).length) {
>>>>>>> REPLACE