- Gulp tasks for common operations.
- Return different configs depending on different settings (env vars, cli, etc.)
Usage
webpackerator.js
module.exports = function(webpack, opts) { return { context: __dirname + "/app", entry: "./entry", output: { path: __dirname + "/dist", filename: "bundle.js", }, } }
Gulp
Webpackerator comes with gulp tasks.
gulpfile.js
const gulp = require('gulp')
require('webpackerator/defaults/gulp')(gulp)
webpackerator.js
is different towebpack.config.js
in that it accepts a function with opts and returns a config. This allows you to return a different config depending on some settings (e.g. environment vars, cli args, etc.).
Dependencies
-
babel-core
is required as adevDep
because it is a peer onbabel-loader
.- Should also be a peer dep.
-
chokidar
is pegged to dep while waiting for vjprs commit to go through.
Might have to run pnpm rebuild fsevents --build-from-source
to get fsevents to not show failed to self-register
message.