Skip to content

need pad when parsing script #1778

Open
@l1shu

Description

@l1shu

Version

16.0.0

Reproduction link

https://codepen.io/l1shu/pen/ExgwjbM

Steps to reproduce

In vue-loader@16

source code:

<template>
  <div />
</template>
<script>
export default {}
</script>

What is expected?

//
//
//
//
export default {}

What is actually happening?

export default {}

add param pad: 'line'
https://github.com/vuejs/vue-loader/blob/next/src/index.ts#L96

const { descriptor, errors } = parse(source, {
    filename,
    sourceMap,
    pad: 'line',
});

That's because the parser of @vue/compiler-sfc use pad=false as default.
see https://github.com/vuejs/vue-next/blob/master/packages/compiler-sfc/src/parse.ts#L84

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy