3 Easy Steps To Add Webpack Into Jekyll
Looking for a quick and easy way to get a simple Webpack set up for your Jekyll project? Look no further!
Before Getting Started
This tutorial assumes the following about your Jekyll project.
- It has a
- You’re using
jekyll-assetsto add a digest to the file name.
webpack.config.js and a
src directory to your Jekyll project’s root.
package.json with the following packages. You might add them using
the Yarn command
yarn add -D @babel/core @babel/preset-env babel-core babel-loader webpack webpack-cli
Add the bundled JS file to a layout or specific page.
Optional but recommended.
To make development life easier, we highly recommend adding
gem "foreman" to
your Gemfile and a Procfile to your project’s root.
local development servers with
Before building your site for deployment, add a few entries to your Jekyll
_config.yml exclude list.
- webpack.config.js - src/ - Procfile