-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update default extensions and move to installer #1181
Conversation
@@ -12,6 +12,9 @@ | |||
"environment.loaders.append('coffee', coffee)\n", | |||
before: "module.exports" | |||
|
|||
say "Updating webpack paths to include .coffee file extension" | |||
insert_into_file Webpacker.config.config_path, " - .coffee\n", after: /extensions:\n/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inserting YAML like this at the corrected indentation level seems a little brittle. Do we do it this way elsewhere in Rails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't find any reference but this is how it's done in Rails: https://github.com/rails/rails/blob/63f0c04850dd0bcdc7d35266e81fa1a7778570a8/railties/lib/rails/generators/actions.rb#L326
May be we can borrow that method.
Do we use these extensions on the Ruby side anywhere? |
Nope we aren't using it internally. |
Merging this for now :) |
* 'master' of https://github.com/rails/webpacker: (21 commits) Update Ruby versions on Travis CI (rails#1230) Make rubocop happy Fix asset helper for non-css assets in hmr mode CSP warning for Rails 5.2 use 2 spaces for indentation in template injection Update README.md (rails#1198) Remove duplicate yarn-error.log (rails#1197) 3.2.1 Revert file loader (rails#1196) Update default extensions and move to installer (rails#1181) Gitignore (rails#1195) Update uglify plugin (rails#1194) Fixes Vue root instance initialization (rails#1187) Return false in production environments (rails#1179) Fix url loader doc[ci skip] (rails#1183) Use inject_into_file to support rails 4.2 Update gems and npm deps (rails#1180) asset_pack_path + HMR fix; Closes rails#1171 (rails#1172) enhance CHANGELOG.md (rails#1170) CI against Ruby 2.5.0 ...
Fixes: #1148
This PR moves out extensions from webpacker.yml to specific installer.