Skip to content

Commit df40794

Browse files
author
Ruben Lopez M
authored
Merge pull request #203 from developmentseed/fix_web_terser
Set ruby-terser for compressor - web
2 parents 3c31538 + 6876ea8 commit df40794

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

images/web/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ RUN git checkout --force 8199002a0fd83a6eec91764bcec9e9e8705c7e5d
118118

119119
# Install the javascript runtime required by the `execjs` gem in
120120
RUN apt-get install -y libv8-dev
121-
RUN echo "gem 'mini_racer'" >> Gemfile
122-
RUN gem install nokogiri -- --use-system-libraries
121+
# RUN echo "gem 'mini_racer'" >> Gemfile
122+
RUN echo "gem 'terser', '~> 1.1.3'" >> Gemfile
123+
# RUN gem install nokogiri -- --use-system-libraries
123124

124125
RUN apt-get install -y cargo
125126
RUN git clone https://github.com/shssoichiro/oxipng.git
@@ -155,7 +156,8 @@ RUN apt-get install -y tzdata
155156
RUN npm install yarn -g
156157
RUN bundle exec rake yarn:install
157158
RUN bundle exec rake i18n:js:export
158-
RUN sed -i -e 's/config.assets.js_compressor = :uglifier/config.assets.js_compressor = Uglifier.new(:harmony => true)/g' $workdir/config/environments/production.rb
159+
# From https://github.com/lautis/uglifier#readme
160+
RUN sed -i -e 's/config.assets.js_compressor = :uglifier/config.assets.js_compressor = :terser/g' $workdir/config/environments/production.rb
159161
RUN bundle exec rake assets:precompile
160162

161163
# The rack interface requires a `tmp` directory to use openstreetmap-cgimap

0 commit comments

Comments
 (0)