Skip to content

Commit

Permalink
build: enable Babel sourcemaps
Browse files Browse the repository at this point in the history
In the add-on's documentation they recommend to edit the file
`/ember-cli-build.js`:
https://github.com/typed-ember/ember-cli-typescript/blob/4e4b161d55aae9d3409f7b7ad9630473af87109b/docs/configuration.md#enabling-sourcemaps

But this is in the context of an application. Here, in the context of an
add-on, this change must be done in the file `/index.js`:

- typed-ember/ember-cli-typescript#1390 (comment)

> ... I saw that the babel config for addons is not supposed to go in
> `ember-cli-build.js` but in `index.js`

- https://github.com/babel/ember-cli-babel/tree/88a8c8154e480cbbd01e96257c5a8097d6be79f1#options

> There are a few different options that may be provided to
> `ember-cli-babel`. These options are typically set in an apps
> `ember-cli-build.js` file, or in an addon or engine's `index.js`.
  • Loading branch information
MrChocolatine committed May 21, 2021
1 parent e2c60bc commit 554fa62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ module.exports = {
// therefore move the config anywhere but in the meta tag.
this.app.options.storeConfigInMeta = false
},

options: {
babel: {
sourceMaps: 'inline',
},
},
}

0 comments on commit 554fa62

Please sign in to comment.