Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
fix(dev): fix sourcemaps url in minified builds
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Jul 1, 2016
1 parent 807b904 commit af4f8d3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ for bundle in "${bundles[@]}"
do
dist_file="$dist_dir_cdn/${bundle}.js"
dist_file_min="$dist_dir_cdn/${bundle}.min.js"
dist_file_sourcemap="$dist_dir_cdn/${bundle}.js.map"
dist_file_sourcemap_min="$dist_dir_cdn/${bundle}.min.js.map"
source_map="${bundle}.js.map"
source_map_min="${bundle}.min.js.map"
dist_file_sourcemap="$dist_dir_cdn/${source_map}"
dist_file_sourcemap_min="$dist_dir_cdn/${source_map_min}"

echo "$license" | cat - "${dist_file}" > /tmp/out && mv /tmp/out "${dist_file}"

uglifyjs "${dist_file}" \
--in-source-map "${dist_file_sourcemap}" \
--source-map "${dist_file_sourcemap_min}" \
--source-map-url "${source_map_min}" \
--preamble "$license" \
-c warnings=false \
-m \
Expand Down

0 comments on commit af4f8d3

Please sign in to comment.