Skip to content

Commit 817ac9c

Browse files
authored
Update configuration.md to include an example of generating sourcemaps with Embroider
I had to add devtool to my webpackConfig in order for sourcemaps to be generated of my typescript files with Embroider. Not sure if this documentation belongs here or in the embroider docs (or whether there are other/better ways to set up the config)
1 parent ef6aab0 commit 817ac9c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/dummy/app/templates/docs/configuration.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,17 @@ const app = new EmberApp(defaults, {
5454

5555
(Note that this _will_ noticeably slow down your app rebuilds.)
5656

57+
If you are using [Embroider](https://github.com/embroider-build/embroider), you might need to inlcude [devtool](https://webpack.js.org/configuration/devtool/) in your webpack configuration:
58+
59+
```ts
60+
return require('@embroider/compat').compatBuild(app, Webpack, {
61+
packagerOptions: {
62+
webpackConfig: {
63+
devtool: 'source-map'
64+
}
65+
}
66+
}
67+
```
68+
5769
If you're updating from an older version of the addon, you may also need to update your `tsconfig.json`. (Current versions generate the correct config at installation.) Either run `ember generate ember-cli-typescript` or verify you have the same sourcemap settings in your `tscsonfig.json` that appear in [the blueprint](https://github.com/typed-ember/ember-cli-typescript/blob/master/blueprints/ember-cli-typescript/files/tsconfig.json).
5870

0 commit comments

Comments
 (0)