Create a new rails application without webpacker.
$ rails new myapp
Add this line to your application's Gemfile:
Run the following to install Simpacker:
$ rails simpacker:install
$ ./node_modules/.bin/webpack --watch
- Webpack settings
- Style Sheets
- Advanced settings
Webpacker is a great product that you can easily use webpack without knowing it. It also provides many useful features. The difficulty with Webpacker is that you need to configure webpack via webpacker's own DSL and webpacker.yml. If you know how to configure webpack, you need to convert it to webpacker configuration. I want to edit webpack.config.js directly!
However, some useful features of Webpacker, such as yarn integrity and compilation on request, are not available in Simpacker.
Simpacker does not provide feature for deployment. Just run the following command at deployment.
$ npm install $ NODE_ENV=production ./node_modules/.bin/webpack
Bug reports and pull requests are welcome on GitHub at https://github.com/hokaccha/simpacker.
The gem is available as open source under the terms of the MIT License.