Skip to content

Source Maps Contain No Information #60

@Pugio

Description

@Pugio

HelloWorld.html:

<h1>Hello {{name}}</h1>

{{#if x > 10}}
  <p>{{x}} is greater than 10</p>
{{elseif 5 > x}}
  <p>{{x}} is less than 5</p>
{{else}}
  <p>{{x}} is between 5 and 10</p>
{{/if}}

<script>
  export default {
    data () {
      return {
        count: 0
      };
    }
  };
</script>

svelte compile -m --format iife HelloWorld.html -o out.js

out.js.map:

{"version":3,"file":null,"sources":[],"sourcesContent":[],"names":[],"mappings":";;,,;;;;;;;;,;;;;;;;;,,;;;;;;;;;;;;;;,,;;;;;;;;,,;;,,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,;;;;;;;;,,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,,;;;;;;;;;;;;;,,;;;;;;;;;;;;;;;;;;;;;,,;;;;;;;;;;;;;,,;;;;;;;;;;;;;;;;;;,,;;;;;;;;;;,,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,;;;;"}

I haven't dealt with sourcemaps much in the past, but shouldn't some of those fields contain file information, and shouldn't mappings contain some data between the ; and , ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions