This was created to handle asset bundling for websites with a monolithic CMS, such as WordPress.
- Webpack 4
- Hot Reloading
- Babel
- Flow
- Eslint
- Scss, CSS
- Webpack Dev Server + BrowserSync
- Copy all files in the repo to the wp-content/ directory of your WordPress install.
- Include wp-webpack-scripts.php in your functions.php file.
- Rename the .env.example file to .env
- Add your PROXY_URL, example:
http://my-awesome-wp-blog.lndo.site
- Add your PUBLIC_PATH, example:
/wp-content/themes/<MY_AWESOME_THEME_NAME>/dist
- In the terminal and from the wp-content/ directory, run
npm install
. - Run
npm start
.
-
npm start
will run the webpack dev server and proxy the local install of your WordPress site. -
npm run build
will create the production build of your assets.
MIT