Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonytonyjan/rails_on_webpack
This product is a demonstration of integration between Rails and Webpack without using any ruby gem.
https://github.com/tonytonyjan/rails_on_webpack
Last synced: about 1 month ago
JSON representation
This product is a demonstration of integration between Rails and Webpack without using any ruby gem.
- Host: GitHub
- URL: https://github.com/tonytonyjan/rails_on_webpack
- Owner: tonytonyjan
- Created: 2016-02-09T15:17:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-15T16:31:19.000Z (almost 9 years ago)
- Last Synced: 2024-04-09T21:30:14.694Z (9 months ago)
- Language: Ruby
- Size: 85.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rails on Webpack
This product is a demonstration of integration between Rails and Webpack without using any ruby gem, including some usefule tools and packages such as:
- SASS
- CoffeeScript
- Material Design Icons
- React
- ES6If you really want to use a gem rather than DIY, [click here](http://github.com/tonytonyjan/webpack_stats)
## Usage
```
bundle
npm i -D
foreman start
```## Production Build
You can set `WEBPACK_ENV` environment variable to `production` to build optimized assets. Briefly, scripts are compressed, and styles will be extracted into a file.
## How it works?
It's simple to intergrate Rails with webpack by using the its stats file and overwriting `#compute_asset_path`.