Sha256: 89a1e3e0f02abb36507f58593f54993c6df0beff49a81863569c98cb9ec17c43

Contents?: true

Size: 1021 Bytes

Versions: 2

Compression:

Stored size: 1021 Bytes

Contents

require "webpacker/configuration"

say "Copying vue loader to config/webpack/loaders"
copy_file "#{__dir__}/loaders/vue.js", Jets.root.join("config/webpack/loaders/vue.js").to_s

say "Adding vue loader to config/webpack/environment.js"
insert_into_file Jets.root.join("config/webpack/environment.js").to_s,
  "const vue =  require('./loaders/vue')\n",
  after: "require('@rails/webpacker')\n"

insert_into_file Jets.root.join("config/webpack/environment.js").to_s,
  "environment.loaders.append('vue', vue)\n",
  before: "module.exports"

say "Copying the example entry file to #{Webpacker.config.source_entry_path}"
copy_file "#{__dir__}/examples/vue/hello_vue.js",
  "#{Webpacker.config.source_entry_path}/hello_vue.js"

say "Copying Vue app file to #{Webpacker.config.source_entry_path}"
copy_file "#{__dir__}/examples/vue/app.vue",
  "#{Webpacker.config.source_path}/app.vue"

say "Installing all Vue dependencies"
run "yarn add vue vue-loader vue-template-compiler"

say "Webpacker now supports Vue.js 🎉", :green

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webpacker-jets-3.2.101 lib/install/vue.rb
webpacker-jets-3.2.100 lib/install/vue.rb