Skip to content

Commit

Permalink
Store all javascripts under plugin's name folder when running webpacker
Browse files Browse the repository at this point in the history
  • Loading branch information
karelhala committed Aug 15, 2017
1 parent cad5591 commit 05003f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
= csrf_meta_tag
= render :partial => 'layouts/i18n_js'
-# FIXME: the conditional below is a temporary fix for a webpacker issue, remove when it's resolved
= javascript_pack_tag 'application' unless Rails.env.test?
= javascript_pack_tag 'manageiq-ui-classic/application' unless Rails.env.test?
:javascript
ManageIQ.charts.provider = "#{Charting.backend}";
Expand Down
3 changes: 1 addition & 2 deletions config/webpack/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ module.exports = {
entry: packPaths.reduce(
(map, entry) => {
const pluginName = dirname(entry).substring(0, dirname(entry).length - join(entryPath).length)
const prefix = basename(entry, extname(entry)) === 'application' ? '' : basename(pluginName) + '/'
map[prefix + basename(entry, extname(entry))] = resolve(entry)
map[join(basename(pluginName), basename(entry, extname(entry)))] = resolve(entry)
return map
}, {}
),
Expand Down

0 comments on commit 05003f3

Please sign in to comment.