Skip to content

Sourcemaps from babel 7.21 and higher are considered invalid #17

Description

@andreyfel

I'm using this package in my ember app which is using ember-cli which is using fast-sourcemap-concat which depends on this package.

Recently, after updating @babel/* packages to the latest the source maps stopped working.

I was able to localize the issue to @babel/generator's update from 7.20.14 to 7.21.3. Probably after this commit it broke: babel/babel#15022.

When I run the ember-cli build with DEBUG='fast-sourcemap-concat:*' I see the following errors in the output:

Mapping: 30:8→29:6 "init" in @ember/engine/instance.js +0ms
  fast-sourcemap-concat: [ember.js#4665] generating new map: @ember/engine/instance.js +1ms
  fast-sourcemap-concat: [ember.js#4665]  invalid sourcemap for: @ember/engine/lib/engine-parent.js +1ms
  fast-sourcemap-concat: [ember.js#4665]    error:  Warning: mismatched names
Expected: getEngineParent || 'getEngineParent' || 'getEngineParent' || "getEngineParent" || "getEngineParent"
Got: (engine) { || (engine) { || (engine) { || (engine) { || (engine) {
Original Line: export function getEngineParent(engine) {
Mapping: 25:26→17:31 "getEngineParent" in @ember/engine/lib/engine-parent.js +0ms

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions