diff --git a/packages/fastboot/README.md b/packages/fastboot/README.md index 1aea48f2..e416a8ed 100644 --- a/packages/fastboot/README.md +++ b/packages/fastboot/README.md @@ -60,6 +60,8 @@ FastBoot.distPath // readOnly accessor that provides the dist path for the curre ### Additional configuration +> By default source maps are enabled by the source-maps-support package. Setting an environment variable `FASTBOOT_SOURCEMAPS_DISABLE=true` will bypass this package effectively disabling source maps support. + `app.visit` takes a second parameter as `options` above which a map and allows to define additional optional per request configuration: diff --git a/packages/fastboot/src/ember-app.js b/packages/fastboot/src/ember-app.js index 91c12ca4..5436bc85 100644 --- a/packages/fastboot/src/ember-app.js +++ b/packages/fastboot/src/ember-app.js @@ -54,10 +54,14 @@ class EmberApp { this.config = allConfig; } - this.scripts = buildScripts([ - require.resolve('./scripts/install-source-map-support'), - ...config.scripts, - ]); + if (process.env.FASTBOOT_SOURCEMAPS_DISABLE) { + this.scripts = buildScripts([...config.scripts]); + } else { + this.scripts = buildScripts([ + require.resolve('./scripts/install-source-map-support'), + ...config.scripts, + ]); + } // default to 1 if maxSandboxQueueSize is not defined so the sandbox is pre-warmed when process comes up const maxSandboxQueueSize = options.maxSandboxQueueSize || 1;