mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't assign a default to webpack
.
Unintentionally makes `--webpack` implied on `rails new apper`. If passed `--webpack` Thor assigns `"webpack"` to `options[:webpack]`, so we can check for that instead of `"base"`.
This commit is contained in:
parent
cfdf6e1368
commit
1373f9bdcf
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ module Rails
|
||||||
class_option :javascript, type: :string, aliases: "-j",
|
class_option :javascript, type: :string, aliases: "-j",
|
||||||
desc: "Preconfigure for selected JavaScript library"
|
desc: "Preconfigure for selected JavaScript library"
|
||||||
|
|
||||||
class_option :webpack, type: :string, default: "base",
|
class_option :webpack, type: :string, default: nil,
|
||||||
desc: "Preconfigure for app-like JavaScript with Webpack"
|
desc: "Preconfigure for app-like JavaScript with Webpack"
|
||||||
|
|
||||||
class_option :skip_yarn, type: :boolean, default: false,
|
class_option :skip_yarn, type: :boolean, default: false,
|
||||||
|
@ -428,7 +428,7 @@ module Rails
|
||||||
def run_webpack
|
def run_webpack
|
||||||
if !(webpack = options[:webpack]).nil?
|
if !(webpack = options[:webpack]).nil?
|
||||||
rails_command "webpacker:install"
|
rails_command "webpacker:install"
|
||||||
rails_command "webpacker:install:#{webpack}" unless webpack == "base"
|
rails_command "webpacker:install:#{webpack}" unless webpack == "webpack"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue