Skip to content

Commit

Permalink
fix: asset pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Oct 22, 2021
1 parent f3a01aa commit 9b06e00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ dump.rdb

.vscode

# Generated Files
/dist/javascripts
/dist/stylesheets
/dist/fonts
/dist/@types
/dist

# Yarn
yarn-error.log
Expand Down
19 changes: 5 additions & 14 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# Be sure to restart your server when you modify this file.

# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'

# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path

Rails.application.config.assets.paths << Rails.root.join('vendor', 'assets')
Rails.application.config.assets.paths << Rails.root.join('dist')

Rails.application.config.assets.precompile += %w( fonts/ionicons.eot fonts/ionicons.svg fonts/ionicons.ttf fonts/ionicons.woff )

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w( stylesheets/app.css javascripts/app.js )

# zip library
Rails.application.config.assets.precompile += %w( zip/zip.js zip/z-worker.js zip/inflate.js zip/deflate.js )

# Recursively add all files and folders in 'dist'.
Rails.application.config.assets.paths << Rails.root.join('dist')
files = Dir.glob('dist/**/*').map! { |file| file.sub('dist/', '') }
Rails.application.config.assets.precompile += files

0 comments on commit 9b06e00

Please sign in to comment.