Support Rails 6 asset recompilation through webpacker - #656
Merged
Conversation
Contributor
Author
|
Hi @d4be4st, just a friendly ping. Can you please check this PR. |
staycreativedesign
approved these changes
Feb 5, 2020
|
@rstacruz Can you please check this PR.. |
|
Can you please merge this? |
lovro-bikic
requested changes
Aug 11, 2021
lovro-bikic
left a comment
Member
There was a problem hiding this comment.
Hi, thanks for the PR. It's good overall, I'd just like to add package.json to asset dirs and node_modules to shared dirs.
In Rails 6, Webpacker is the default JavaScript compiler. This commit add app/javascript/ to asset_dir as it is the default directory used by Webpacker.
the-spectator
force-pushed
the
support_webpacker
branch
from
August 14, 2021 05:17
fad4069 to
5110989
Compare
lovro-bikic
added a commit
that referenced
this pull request
Oct 3, 2023
This reverts commit 5f413c2.
lovro-bikic
added a commit
that referenced
this pull request
Oct 3, 2023
This reverts commit 5f413c2.
lovro-bikic
added a commit
that referenced
this pull request
Oct 3, 2023
Member
|
Reverted in #723, the main reason being backward compatibility. This still doesn't prevent you from using Webpack with Mina on your project because you can adjust the variables in your project's # config/deploy.rb
set :compiled_asset_path, ['public/assets', 'public/packs']
set :asset_dirs, ['vendor/assets/', 'app/assets/', 'app/javascript/', 'package.json']
set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', 'node_modules', *fetch(:compiled_asset_path)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Rails 6, Webpacker is the default JavaScript compiler.
This PR adds app/javascript/ to asset_dir & public/packs/ to complied_asset_path as it is the default directory used by Webpacker.