Skip to content

Commit

Permalink
Merge pull request blockscout#5172 from blockscout/js-optimizations
Browse files Browse the repository at this point in the history
Reducing the size of JS bundles
  • Loading branch information
vbaranov authored and jagdeep sidhu committed Feb 11, 2022
1 parent 5ad5d33 commit 4fdfc5e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [#5160](https://github.com/blockscout/blockscout/pull/5160) - Fix blocks validated hint
- [#5155](https://github.com/blockscout/blockscout/pull/5155) - Fix get_implementation_abi_from_proxy/2 implementation
- [#5154](https://github.com/blockscout/blockscout/pull/5154) - Fix token counters bug
- [#4701](https://github.com/blockscout/blockscout/pull/4701) - Reduced the size of js bundles

### Chore
- [#5171](https://github.com/blockscout/blockscout/pull/5171) - Replace lodash NPM package with tiny lodash modules
Expand Down
1 change: 0 additions & 1 deletion apps/block_scout_web/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import './locale'

import './pages/layout'
import './pages/dark-mode-switcher'
import './pages/stakes'

import './lib/clipboard_buttons'
import './lib/currency'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import $ from 'jquery'
import hljs from 'highlight.js'
import hljs from 'highlight.js/lib/core'

// only activate highlighting on pages with this selector
if ($('[data-activate-highlight]').length > 0) {
hljs.initHighlightingOnLoad()
if (document.querySelectorAll('[data-activate-highlight]').length > 0) {
hljs.highlightAll()
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import $ from 'jquery'
import hljs from 'highlight.js'
import hljs from 'highlight.js/lib/core'

// only activate highlighting on pages with this selector
if ($('[data-activate-highlight]').length > 0) {
hljs.initHighlightingOnLoad()
if (document.querySelectorAll('[data-activate-highlight]').length > 0) {
hljs.highlightAll()
}
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@
@view_module != Elixir.BlockScoutWeb.APIDocsView &&
@view_module != Elixir.BlockScoutWeb.Admin.DashboardView &&
@view_module != Elixir.BlockScoutWeb.SearchView &&
@view_module != Elixir.BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView
@view_module != Elixir.BlockScoutWeb.AddressContractVerificationViaStandardJsonInputView &&
@view_module != Elixir.BlockScoutWeb.StakesView
) do %>
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/app.js") %>"></script>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@

</div>
</section>
<div class="stakes-progress-graph-thing-for-getting-color"></div>
<div class="stakes-progress-graph-thing-for-getting-color"></div>
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/stakes.js") %>"></script>

0 comments on commit 4fdfc5e

Please sign in to comment.