$ npm install --save-dev webpkr
Install with npm
:
$ npm install --save-dev webpkr
Create a webpack.config.js
in your project’s root and add:
const webpkr = require('webpkr');
module.exports = webpkr({projectDir: __dirname});
By default, webpkr looks for config scripts in a ./webpkr
module. Create a webpkr
subdirectory in your project’s root and add file index.js
in it:
$ mkdir webpkr
$ touch webpkr/index.js
Add the following DSL script to webpkr/index.js
:
context( projectDir )
entry( './src/index.js')
output( () => {
filename( 'bundle.js' )
path$( 'dist' )
} )