forked from mipearson/webpack-rails-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate from webpack-rails to external_asset_pipeline #2
Merged
Conversation
This file contains 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
This avoids having two `application.js` files (one in `webpack/` and one in `app/assets`, which is confusing/error-prone) in favor of using unique/unambiguous filenames.
This will be used to produce an asset manifest mapping entry point names to hashed filenames, for use with the external_asset_pipeline gem. (The current asset manifest produced by the StatsPlugin is in a different format that includes a bunch of extra information which isn't needed by and isn't compatible with external_asset_pipeline.)
This will be used to replace webpack-rails, which is no longer maintained.
instead of webpack-rails (as the latter is no longer maintained, so we're replacing it with the former).
These were outdated after we switched from webpack-rails to the external_asset_pipeline gem.
This was only needed for webpack-rails, which we've stopped using in favor of the external_asset_pipeline gem (which uses the manifest produced by the webpack-assets-manifest plugin).
Both webpack-assets-manifest and external_asset_pipeline assume a default manifest filename of `manifest.json`. The only reason we weren't using this default before was because we had been using the StatsPlugin to produce a different `manifest.json` file. Now that we've removed the StatsPlugin, we can rely on the default webpack-assets-manifest and external_asset_pipeline configuration.
We stopped using webpack-rails, but we still want these entries in the gitignore, so we just made the comment more general.
We've replaced this gem (which is no longer maintained) with the external_asset_pipeline gem
rmacklin
changed the title
Switch from webpack-rails to external_asset_pipeline
Migrate from webpack-rails to external_asset_pipeline
Oct 5, 2019
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.
This PR serves as an example of how to migrate an application from the webpack-rails gem (which is no longer maintained) to the external_asset_pipeline gem.
For the most part, the webpack configuration file can be left alone; the only change is switching plugins from
stats-webpack-plugin
towebpack-assets-manifest
.