Webpacker (with Rails)
Webpacker makes it easy to use the JavaScript pre-processor and bundler webpack to manage application-like JavaScript in Rails. The default JavaScript build tool in Rails 6.
In addition to supporting a standard webpack configuration, we also are compatible with the Ruby on Rails webpacker gem.
You can add the plugin configuration in config/webpack/environment.js
1
const { environment } = require('@rails/webpacker')
2
const PacktrackerPlugin = require('@packtracker/webpack-plugin')
3
4
environment.plugins.append(
5
'PacktrackerPlugin',
6
new PacktrackerPlugin({
7
project_token: '<your packtracker project token>',
8
upload: true
9
})
10
)
11
12
module.exports = environment
Copied!
This is the only specific difference in setting up a project with us using the webpacker gem with Rails, please see the rest of our documentation below for more detail.
Last modified 2yr ago
Copy link