Middleman Webpack
Usage
Add this line to your Gemfile
gem 'middleman-webpacked', '~> 0.0.2'
Setup your Webpack
middleman webpack
Add javascript_pack_tag to your layout
<%= javascript_pack_tag 'bundle' %>
Activate the extension in config.rb
activate :webpack
Put 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
- [x] Running Webpack without config
- [ ] Automatic setup
webpack.config.js - [x] Babel Support
- [ ] React.js Support
- [ ] Vue.js Support