Middleman Webpacked
Usage
Add this line to your Gemfile
gem 'middleman-webpacked', '~> 0.1.0'Setup your Webpack
middleman webpackTo enable React.js, add
--reactoptions when setup Webpack To enable Vue.js, add--vueoptions when setup Webpack
Add javascript_pack_tag to your layout
<%= javascript_pack_tag 'bundle' %>Activate the extension in config.rb
activate :webpackPut the javascript into src directory
This version only support Webpack 4 default config
Options
Entry
If you want to output more than one file (bundle.js) you can specify the entry options.
activate :webpack,
entry: {
app: 'index.js',
ext: 'ext.js'
}Roadmap
- Running Webpack without config
- Automatic setup
webpack.config.js - Babel Support
- React.js Support
- Can be enabled
- Support to generate css file
- Vue.js Support
- Can be enabled
- Support template and
.vuefile - Support to generate css file
- Sass Support