DocPad plugin to bundle CommonJS/AMD/Labeled Modules with webpack.
Want to see pretty graphs? Log in now!
npm install docpad-plugin-webpack
|6||downloads in the last week|
|12||downloads in the last month|
|Last Published By|
|Version||2.1.0 last updated 3 months ago|
|Keywords||docpad, docpad-plugin, webpack|
$ docpad install webpack
Reference the webpack configuration for a full understanding of webpack. The below is only an introduction to how to use it with DocPad:
src/documents/entry.js file as your webpack entry point to your application.
--- webpack: true --- console.log("It works.");
When building with DocPad, webpack will compile the bundles to
Create a file
src/documents/content.js with the following content:
module.exports = "It works from content.js.";
entry.js to make use of it:
--- webpack: true --- var content = require("./content.js"); console.log(content);
Rebuilding with DocPad will bundle both
plugins: webpack: verbose: false debug: true
It is also possible to pass the options through on a document-basis:
--- webpack: verbose: false debug: true --- var myfile = require('./myfile'); console.log(myfile);
These amazing people are maintaining this project:
- Rob Loach (http://robloach.net)
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Copyright © Rob Loach (http://robloach.net)