From c1487939d9e48725fab4c0b573a6f1156e95a921 Mon Sep 17 00:00:00 2001 From: johanrd Date: Tue, 8 Dec 2020 09:45:00 +0100 Subject: [PATCH] docs: 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) --- tests/dummy/app/templates/docs/configuration.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/dummy/app/templates/docs/configuration.md b/tests/dummy/app/templates/docs/configuration.md index 58f9d2cf3..d51da603f 100644 --- a/tests/dummy/app/templates/docs/configuration.md +++ b/tests/dummy/app/templates/docs/configuration.md @@ -54,5 +54,17 @@ const app = new EmberApp(defaults, { (Note that this _will_ noticeably slow down your app rebuilds.) +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: + +```ts +return require('@embroider/compat').compatBuild(app, Webpack, { + packagerOptions: { + webpackConfig: { + devtool: 'source-map' + } + } +} +``` + 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).