Commit 4c1bd9fe authored by Robert Knight's avatar Robert Knight

Remove sourcemap link from boot script

The replacement of var placeholders with values invalidates the
sourcemap locations and the sourcemap URL is invalid after the file is
copied from build/scripts/ to build/. Since the script is tiny the debug
info is not that valuable so this commit just removes the sourcemap URL
to avoid browsers complaining that they cannot retrieve it.
parent 97a95bed
...@@ -284,6 +284,9 @@ function generateBootScript(manifest) { ...@@ -284,6 +284,9 @@ function generateBootScript(manifest) {
.pipe(replace('__MANIFEST__', JSON.stringify(manifest))) .pipe(replace('__MANIFEST__', JSON.stringify(manifest)))
.pipe(replace('__ASSET_ROOT__', defaultAssetRoot)) .pipe(replace('__ASSET_ROOT__', defaultAssetRoot))
.pipe(replace('__SIDEBAR_APP_URL__', defaultSidebarAppUrl)) .pipe(replace('__SIDEBAR_APP_URL__', defaultSidebarAppUrl))
// Strip sourcemap link. It will have been invalidated by the previous
// replacements and the bundle is so small that it isn't really valuable.
.pipe(replace(/.*sourceMappingURL.*/,''))
.pipe(rename('boot.js')) .pipe(rename('boot.js'))
.pipe(gulp.dest('build/')); .pipe(gulp.dest('build/'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment